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 03-07-2009, 05:14 AM
StuUK StuUK is offline
Registered User
Pro Plus Member
 
Join Date: Oct 2008
Posts: 327
Default Recent news question

I have added a sidebar area on the home page to show the latest Post. Ive used this code:

Code:
<?php $recent = new WP_Query("showposts=1"); while($recent->have_posts()) : $recent->the_post();?>
I have create two categories now, one "News", one "Featured Products". The "Featured Products" posts are being shown now but I only want the "News" category posts to show.

what code do I need to only pull the latest post from a specific category? Cant figure it out
 

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
A question about the News Child Theme aslekaldestad General Discussion 1 05-12-2010 08:57 AM
Recent News / Education theme LindaWest General Discussion 1 03-22-2010 10:25 AM
E-news & Recent Posts Sports Mom General Discussion 6 02-10-2010 11:47 PM
E-News/RSS by Email Question TyyWard General Discussion 6 06-20-2009 08:32 PM
Problem - Posts show up on Latest Episodes AND Recent News joe.g.pena General Discussion 4 03-01-2009 09:05 AM


All times are GMT -5. The time now is 10:07 AM.

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