StudioPress Community Forums
  StudioPress Community Forums > Forums > General Discussion
For help and support, access to your downloads, or to manage your account please log into My StudioPress.

These forums have been set to read-only so you can browse the existing topics for any questions you may have.

For general discussion on WordPress, CSS and design (NOT for support) visit the new Community Forums.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-21-2012, 10:17 PM
golden golden is offline
Registered User
Genesis Member
 
Join Date: Dec 2010
Posts: 268
Default Random Testimonial

I'd like to expand on this by pulling one random testimonial and have it appear in specific page bodies (not widgets). I

My testimonials are individual blog posts with custom fields pulled to one review page. I was hoping this code would work:

Code:
<ul>
<?php query_posts('category_name=Testimonials&showposts=1&offset=0&orderby=rand'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<li>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</li>
<?php endwhile; endif; ?>
</ul>

But it doesn't. I also tried replacing category name with category id=36 . No good.

Any suggestions?

Last edited by GaryJ; 09-24-2012 at 09:59 AM. Reason: Created new thread
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Testimonial/Quotes Plugin... dawud.miracle General Discussion 1 04-14-2011 02:43 PM
Testimonial Plugin? TyyWard General Discussion 1 01-29-2011 05:16 PM


All times are GMT -5. The time now is 04:36 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.