Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Center area post/pages (http://forum.bytesforall.com/forumdisplay.php?f=32)
-   -   Random posts on home page (http://forum.bytesforall.com/showthread.php?t=13660)

bogdanvelea Apr 5, 2011 06:30 PM

Random posts on home page
 
Hello!

I'm looking for a way to set up home page to display random posts.

I founded something but i don't know if it is ok:
- to replace < ?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
with: < ?php query_posts(array('orderby' => 'rand', 'category_name' => SomeCategoryName, 'showposts' => 1)); if (have_posts()) : while (have_posts()) : the_post(); ?>

But i can't apply this because atahualpa theme is different.

Can you tell me what may i write instead

<?php while (have_posts()) : the_post(); $bfa_ata['postcount']++; ?>

<?php include 'bfa://content_inside_loop'; ?>

<?php endwhile; ?>

Thanks in advance

lmilesw Apr 5, 2011 06:54 PM

Why not just use a plugin like this one? All it requires is to had a piece of shortcode to a post or page.

bogdanvelea Apr 6, 2011 07:23 AM

This plugin is loading just one post. I want to load 10 posts but in random mode. I do not necessarily to reload with an interval and fade effect...

lmilesw Apr 6, 2011 07:47 AM

To give you more control you might want to try the List Category Posts plugin. You can set to the number of posts you want to show and randomly sort. You can also show excerpts or not. There are many configuration options.

bogdanvelea Apr 10, 2011 03:33 PM

Hello!

It is a great plugin, but, i can not set it to show only featured images...
Now, you can see on my website (wowallpapers.com) that i have only featured images (without title, text etc.)


All times are GMT -6. The time now is 01:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.