add files
This commit is contained in:
26
entrynode.php
Normal file
26
entrynode.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/*
|
||||
Template Name: Entry node
|
||||
*/
|
||||
|
||||
//die;
|
||||
|
||||
$count = (int)get_option('entrynode_count');
|
||||
$count = $count+1;
|
||||
update_option('entrynode_count', $count);
|
||||
|
||||
$posts = get_posts(
|
||||
array(
|
||||
'post_status' => 'publish',
|
||||
'post_type' => array('anew','profile_article','yellow'),
|
||||
'posts_per_page' => 5,
|
||||
'orderby' => 'date',
|
||||
'order' => 'DESC'
|
||||
)
|
||||
);
|
||||
|
||||
//wp_redirect('https://profile.ru/archive/vremya-proverennogo-123132/',301);
|
||||
wp_redirect(get_permalink($posts[rand(0,4)]), 301);
|
||||
exit;
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user