• Resolved wagawaga

    (@wagawaga)


    Hi,

    I got a few categories say 1-5. I would like to display recent posts from category 1-3, excluding 4-5. How to do that?

    The display will mix the posts from category 1-3

Viewing 6 replies - 1 through 6 (of 6 total)
  • Drew

    (@drewrockshard)

    I apologize. You said, RECENT posts didn’t you. I believe there is a plugin out there called recent posts plugin. That can be found here. I am not sure if you can exclude certain categories though. I would start searching the forums on this though, I’m sure this has been discussed, and you should have searched before posting. I know I have seen this before.

    Regards,
    Drew

    Thread Starter wagawaga

    (@wagawaga)

    OK Thanks.

    Thread Starter wagawaga

    (@wagawaga)

    still i could not find what am i looking for. can anybody help me to point which post does suit what i need?

    yes i want to display recent posts but for certain categories only, not all.

    where are we displaying these posts? Main index? Sidebar?

    Thread Starter wagawaga

    (@wagawaga)

    sidebar…

    i found post like this one, but i’m not sure;
    I use the following code to generate a list of the titles of the 10 most recent post in my sidebar and exclude 1 category (with id=18 in this example):

    i found this error;

    WordPress database error: [Not unique table/alias: ‘wp_post2cat’]
    SELECT SQL_CALC_FOUND_ROWS wp_posts.*, wp_sticky.sticky_status FROM wp_posts LEFT JOIN wp_post2cat ON (wp_posts.ID = wp_post2cat.post_id) LEFT JOIN wp_post2cat ON (wp_posts.ID = wp_post2cat.post_id) LEFT JOIN wp_sticky ON wp_sticky.sticky_post_id = wp_posts.ID WHERE 1=1 AND wp_posts.ID NOT IN (3) AND (post_type = ‘post’ AND (post_status = ‘publish’)) AND category_id NOT IN (1,2) GROUP BY wp_posts.ID ORDER BY (wp_sticky.sticky_status = 2 AND wp_sticky.sticky_status IS NOT NULL) DESC, DATE_FORMAT(wp_posts.post_date,’%Y-%m-%d’) DESC, (wp_sticky.sticky_status = 1 AND wp_sticky.sticky_status IS NULL) DESC, DATE_FORMAT(wp_posts.post_date,’%T’) DESC LIMIT 0, 10

    how to exclude a few categories from recent post in the sidebar?

    Thread Starter wagawaga

    (@wagawaga)

    i found the solution, using coffee to code plug ins. thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Multiple category recent posts’ is closed to new replies.