Monday, 2 October 2017

How to Add Random Post Button In Wordpress Urdu

How to Add Random Post Button In Wordpress Urdu

Code : 

function random_add_rewrite() {
       global $wp;
       add_rewrite_rule('random/?$', 'index.php?random=1', 'top');

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);

<a href="/?random=1">Random Post</a>

Watch Video

WP Random Button
How to Get a Random Post Button in WordPress
How to Redirect Users to a Random Post in WordPress
Wordpress: Create A Random Post Button
How to add a Random Post button in wordpress - wpsites
How to Add a Random Post Button in WordPress?
WordPress Random Post Button Code Snippets
Create a Random Post button in WordPress
random post generator wordpress
random post wordpress
wordpress show random posts on homepage
wordpress random page
wp random button
wordpress random redirect
wordpress random post order
display random posts wordpress

random post generator wordpress,random post wordpress,wordpress show random posts on homepage,wordpress random page,wp

random button,wordpress random redirect,wordpress random post order,display random posts wordpress

Previous Post
Next Post

Blogger By Passion, Programmer By Love And SEO Expert By Birth.This Quote Explain Me Perfectly.