GPL5U
Administrative
Staff member
Administrator
Theme5s Lover
Trusted Uploader
Decoding Master
Reputation: 100%
gpl5u submitted a new resource:
Secret PING index speed with wordpress - Auto ping random post wordpress with google
Read more about this resource...
Secret PING index speed with wordpress - Auto ping random post wordpress with google
1. Add this code to filefunctions.php
PHP:add_action('init','random_add_rewrite'); function random_add_rewrite() { global $wp; $wp->add_query_var('random'); add_rewrite_rule('random/?$', 'index.php?random=1', 'top'); } add_action('template_redirect','random_template'); function random_template() { if (get_query_var('random') == 1) { $posts = get_posts('post_type=post&orderby=rand&numberposts=1'); foreach($posts as $post) { $link = get_permalink($post); }...
Read more about this resource...