<?php query posts( 'orderby=rand' ); ?>
<?php if ( have_posts() ) : ?>
<?php twentyeleven_content_nav( 'nav-above' ); ?>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', get_post_format() ); ?>
<?php endwhile; ?>
<?php twentyeleven_content_nav( 'nav-below' ); ?>
<?php else : ?>
<?php query posts( 'orderby=rand' ); ?>
<?php if ( have_posts() ) : ?>
<?php twentyeleven_content_nav( 'nav-above' ); ?>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', get_post_format() ); ?>
<?php endwhile; ?>
<?php twentyeleven_content_nav( 'nav-below' ); ?>
<?php else : ?>
In your index.php "loop", you want to include the following custom query:
PHP:<?php query posts( 'orderby=rand' ); ?>
I think you can put it right at the top of your wordpress theme index.php.because im new in wordpress can you tell me what steps i have to follow to get to the index.php? and i will post the query in any place?
because im new in wordpress can you tell me what steps i have to follow to get to the index.php? and i will post the query in any place?
I think you can put it right at the top of your wordpress theme index.php.
So go to your theme folder via ftp, download the index.php, add the line, save the file and upload it again
I think you can put it right at the top of your wordpress theme index.php.
So go to your theme folder via ftp, download the index.php, add the line, save the file and upload it again
In your index.php "loop", you want to include the following custom query:
PHP:<?php query posts( 'orderby=rand' ); ?>
In TwentyEleven, the start of the loop looks like this:
PHP:<?php if ( have_posts() ) : ?> <?php twentyeleven_content_nav( 'nav-above' ); ?> <?php /* Start the Loop */ ?> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'content', get_post_format() ); ?> <?php endwhile; ?> <?php twentyeleven_content_nav( 'nav-below' ); ?> <?php else : ?>
Change it to:
PHP:<?php query posts( 'orderby=rand' ); ?> <?php if ( have_posts() ) : ?> <?php twentyeleven_content_nav( 'nav-above' ); ?> <?php /* Start the Loop */ ?> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'content', get_post_format() ); ?> <?php endwhile; ?> <?php twentyeleven_content_nav( 'nav-below' ); ?> <?php else : ?>
What theme are you using? It may be pulling from the loop.phpi opened the index.php but didnt find the