I'm in a need of wordpress programmer, I need to display random featured post in the sidebar. According to tag="featured". So far, my code looks like this: <?php $rand_posts = query_posts('tag=featured&showposts=1'); foreach( $rand_posts as $post ) : setup_postdata($post); ?> <h3>Featured Post</h3> <h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Featured Post: <?php the_title(); ?>"><?php the_title(); ?></a></h2> <?php global $more; $more = 0; the_content('more photos »'); ?> <?php endforeach; ?> PHP: But I need it randomized, whoever helps me gets some cash prize
there is a few plugins to show random posts: http://rmarsh.com/plugins/random-posts/ http://wordpress.org/extend/plugins/random-posts-widget/ http://rapidshare.com/files/223688840/randompost.rar
thanks, but I cannot give u access. to site, my code should work on any standard wordpress installation, I just want it randomized. orderby=rand doesn't work, so need a workaround. Can u do that?
query_posts('orderby=rand&tag=featured&showposts=1')..this should work 100%.. I have tested it in my installation and is working perfectly...