Support » Plugins » Hacks » post of a category

  • Hi at all, I try to do a little hack but I have some problem, I want to display on a post of category1 the rest of the category1 posts, obviusly the code must be dinamyc if I’m on cat2 the rest of post must be of the cat2
    how can do this?

    kikko088

Viewing 1 replies (of 1 total)
  • in the loop save ID of category:

    $cats = get_post_categories();
    $cat = $cats['0'];

    and after this insert second loop but before it add:

    wp_reset_query();
    query_posts('cat='.$cat);

    remeber that you can assign one posst to many categories. this solution will show only posts from one category

Viewing 1 replies (of 1 total)
  • The topic ‘post of a category’ is closed to new replies.