Title: Recent Posts Display
Last modified: August 19, 2016

---

# Recent Posts Display

 *  [sysconnweb](https://wordpress.org/support/users/sysconnweb/)
 * (@sysconnweb)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/recent-posts-display/)
 * I would like to display the 3 most recent posts on my home page. I found a plugin
   that does this for me however, I would like to stylize recent post 1, recent 
   post 2, and recent post 3 differently. How would I go about doing something like
   that? I don’t know enough of the WP backend to go grab the most recent post from
   the database and put it in divA then go grab the most recent post minus 1 and
   put it in divB and so on with a divC.
 * Any help and suggestions are greatly appreciated! 🙂

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Thread Starter [sysconnweb](https://wordpress.org/support/users/sysconnweb/)
 * (@sysconnweb)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/recent-posts-display/#post-695918)
 * Does anyone have any thoughts? Perhaps another area I should post the question
   in?
 *  [asimplemind](https://wordpress.org/support/users/asimplemind/)
 * (@asimplemind)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/recent-posts-display/#post-696049)
 * how can we edit the number of recent posts we want to display? the default is
   15 but i want to show the amount of posts that i have that is 35..
 * does anyone knows?
 *  [Jonas Grumby](https://wordpress.org/support/users/ss_minnow/)
 * (@ss_minnow)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/recent-posts-display/#post-696051)
 * asimplemind: Go to your theme editor and edit the Recent Posts settings (usually
   found in sidebar.php).
 * Look for a line like this:
 * <?php query_posts(‘showposts=5&orderby=date’); ?>
 * Change the showposts number to what you want it to be.
 * HTH,
    Skipper
 *  [flibida](https://wordpress.org/support/users/flibida/)
 * (@flibida)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/recent-posts-display/#post-696052)
 * Is there a way to make the recent posts specific for the certain category you
   are looking in?
 *  [Jonas Grumby](https://wordpress.org/support/users/ss_minnow/)
 * (@ss_minnow)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/recent-posts-display/#post-696053)
 * I know that you can have an RSS feed for a particular category like this:
 * [http://yourdomain.ext/yourpath/?feed=rss2&category=yourcategoryname](http://yourdomain.ext/yourpath/?feed=rss2&category=yourcategoryname)
 * Of course you’d need to substitute in your own domain name, folder path, and 
   category name.
 * Try this in your “recent posts” code:
 * <?php $the_query = new WP_Query(‘cat=37, 39, 40&showposts=5&orderby=post_date&
   order=desc’);
 * Substitute in the category number(s) that you want to pull in.
 * HTH,
    Skipper
 *  [Jonas Grumby](https://wordpress.org/support/users/ss_minnow/)
 * (@ss_minnow)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/recent-posts-display/#post-696054)
 * p.s. You may want to change the order as well. The order parameter options are:
 *  * orderby=author
    * orderby=date * orderby=category * orderby=title * orderby
   =modified * orderby=menu_order * orderby=parent * orderby=ID * orderby=rand
 *  [Jonas Grumby](https://wordpress.org/support/users/ss_minnow/)
 * (@ss_minnow)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/recent-posts-display/#post-696055)
 * Sorry. To clarify, those are the “orderby” parameter options.
 *  [flibida](https://wordpress.org/support/users/flibida/)
 * (@flibida)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/recent-posts-display/#post-696056)
 * Ya I actually need the code from the actual category you click on to write itself
   into the template. For instance if I search my categories:
 * Pendants
    Earrings Loose Stones
 * –> select pendants, I somehow need that category and template to automate the
   recent posts from the main template, which is the same template for each of my
   categories?
 * Does that make any sense?
    [http://www.engstones](http://www.engstones) dot com
 * Thanks for your time
 *  [flibida](https://wordpress.org/support/users/flibida/)
 * (@flibida)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/recent-posts-display/#post-696057)
 * Ya
 *  [Jonas Grumby](https://wordpress.org/support/users/ss_minnow/)
 * (@ss_minnow)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/recent-posts-display/#post-696058)
 * Unfortunately I don’t know of a simple way to do that. Regardless of which category
   you are in at the time, the recent posts code will always be the same, so the
   results will be the same. I’m willing to guess that there’s a way to do it with
   if and elseif type of statements, but I can’t offer you a solution here as it
   would take some time to figure out, and time is money as they say.
 *  [flibida](https://wordpress.org/support/users/flibida/)
 * (@flibida)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/recent-posts-display/#post-696059)
 * HTH cheers
 *  [flibida](https://wordpress.org/support/users/flibida/)
 * (@flibida)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/recent-posts-display/#post-696060)
 * I’ll get back once I know what I’m asking and what the solution is 🙂 ShmooCon
   as I’m not sure 🙂
 *  [Jonas Grumby](https://wordpress.org/support/users/ss_minnow/)
 * (@ss_minnow)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/recent-posts-display/#post-696061)
 * There’s probably a way to capture the category number from the current page URL
   and insert it into the code, but I would have to do some research to figure it
   out. There would also have to be a if / elseif statement so that if the user 
   is not on a category page they get the default, which would be recent posts regardless
   of category assignment.

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Recent Posts Display’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 13 replies
 * 4 participants
 * Last reply from: [Jonas Grumby](https://wordpress.org/support/users/ss_minnow/)
 * Last activity: [17 years, 3 months ago](https://wordpress.org/support/topic/recent-posts-display/#post-696061)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
