Sorting home page by Category

14 views
Skip to first unread message

Lisa Drew

unread,
Feb 19, 2014, 9:23:18 AM2/19/14
to mpls-stpau...@googlegroups.com
I have a magazine styled template that I would like to sort by category and not by date of most recent post.  I know there's probably something that I can place in my functions.php or index.php, but I'm not having any luck.  Of course I have a child theme in place.

Would one of you fine experts have a code that might work for this?  It's a cooking site and they want to feature the last 2 recent posts by certain topics on the front page.  

As always, I'm most grateful for all the conversation in this group!

Lisa

Tom Penney

unread,
Feb 19, 2014, 9:34:06 AM2/19/14
to mpls-stpau...@googlegroups.com
This is not as easy as it seems it should be. This article shows some solutions that will do what you want.


--
You received this message because you are subscribed to the Google Groups "Minneapolis St. Paul WordPress User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mpls-stpaul-word...@googlegroups.com.
To post to this group, send email to mpls-stpau...@googlegroups.com.
Visit this group at http://groups.google.com/group/mpls-stpaul-wordpress.
For more options, visit https://groups.google.com/groups/opt_out.



--
Tom Penney
952-200-3363

Jerry Milo Johnson

unread,
Feb 19, 2014, 9:38:49 AM2/19/14
to mpls-stpau...@googlegroups.com
Do you really want to sort by category?

Or do you want to FILTER by category, and only show the most recent posts in the desired categories (still sorted by reverse date)?

Do you want one result for each of those categories, or multiple per category. And do you want those results grouped by category then sorted by date, (so you have the most recent 5 Blue posts, and then the most recent 5 Red posts), or do you just want the most recent 10 Red or Blue posts, in reverse date order?


Tom Penney

unread,
Feb 19, 2014, 10:09:02 AM2/19/14
to mpls-stpau...@googlegroups.com
I read it as the 2 most recent posts from each category given a list of categories. 

Lisa Drew

unread,
Feb 19, 2014, 10:23:42 AM2/19/14
to mpls-stpau...@googlegroups.com
I definitely want to show specific category blocks on the home page

CATEGORY A
Thumbnail Recent Post
thumbnail Recent Post

CATEGORY B
Thumbnail Recent Post 
Thumbnail Recent Post

Nick Ciske // Thought Refinery

unread,
Feb 19, 2014, 10:25:50 AM2/19/14
to mpls-stpau...@googlegroups.com
Rather than hacking the loop, you may just want to use this shortcode with the category argument?

Tom Penney

unread,
Feb 19, 2014, 3:55:57 PM2/19/14
to mpls-stpau...@googlegroups.com
I misunderstood. Thought they were all suppose to be in one mixed list. Nicks solution is clearly better.   
--
Tom Penney
952-200-3363
Reply all
Reply to author
Forward
0 new messages