Support » Fixing WordPress » I dont want to see all the post in father categories

  • Resolved interespacios

    (@interespacios)


    Hi

    I want create a categories menu with 3 lebels child fathers and …. well, in fact I already do that but when I write a post in child, this post is show in father and father/father categories, I want to show just the post to belong to a categorie

    What Can I do?

Viewing 1 replies (of 1 total)
  • Thread Starter interespacios

    (@interespacios)

    I will reply this for my self, I just look arround for a while and find this: It works OK
    I just copy and paste here

    hi i post this ‘cos it’s a way to refresh an old post i found on this forum http://wordpress.org/support/topic/71767
    and some of you may be interested…
    Well, the goal is that each category displays only its own posts and not those of its child categories.

    here you go:
    (this in WP v.2.0.4, line numbers may change in further versions)

    open wp-includes/classes.php
    just insert // at the very beginning of these lines – or destroy them:
    line 473
    $whichcat .= get_category_children($cat_array[0], ‘ ‘.$andor.’ category_id ‘.$eq.’ ‘);

    line 476
    $whichcat .= get_category_children($cat_array[$i], ‘ ‘.$andor.’ category_id ‘.$eq.’ ‘);

    line 514
    $whichcat .= get_category_children($q[‘cat’], ” OR category_id = “);

    You’re done! Code is poetry, as they say!

Viewing 1 replies (of 1 total)
  • The topic ‘I dont want to see all the post in father categories’ is closed to new replies.