add files
This commit is contained in:
21
entrynode-single.php
Normal file
21
entrynode-single.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/*
|
||||
Template Name: Entry node single
|
||||
*/
|
||||
|
||||
//die;
|
||||
|
||||
|
||||
$post = get_post();
|
||||
$content = $post->post_content;
|
||||
|
||||
$count = (int)get_option('entrynode_single_count');
|
||||
$count = $count+1;
|
||||
update_option('entrynode_single_count', $count);;
|
||||
|
||||
$links = explode("\n", $content);
|
||||
|
||||
wp_redirect($links[rand(0, count($links)-1)], 301);
|
||||
exit;
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user