WordPress.org

Ready to get started?Download WordPress

Forums

Mimbo & Excluding Children Help (8 posts)

  1. sherrgibbs
    Member
    Posted 5 years ago #

    Hi,

    I posted this on the Mimbo support forums and unfortunately, no one responded. Using the Mimbo theme, I would like to make certain Parent Categories appear as links in the Nav bar. I have the code to do this, so that isn't a problem- it works just as I need it to. HOWEVER, y problem is when I do it, it also shows all of the Children assigned to each Parent. [some of my Parent categories have TONS of Children, so you can imagine what a mess occurs!] I would like to simply post the Parent Category as a link in the Nav bar w/o the Children.

    When searching the forums, I only found the reverse of this. [someone was looking to exclude the Parent and only show Children]

    I'm a relative novice so if anyone could help, I'd greatly appreciate it. Just pretend you're talking to a 5 year old who is superb at copying & pasting code.

  2. MichaelH
    Member
    Posted 5 years ago #

    Does the depth=1 with the template tag, wp_list_categories(), work for you?

  3. sherrgibbs
    Member
    Posted 5 years ago #

    Nope. I tried that. It still pulls all of the children into the Nav bar.

  4. MichaelH
    Member
    Posted 5 years ago #

    The nav bar on that theme uses pages not categories. Am I missing something?

    Guess a link to download the theme is in order and a link to see the site with the problem, if possible.

  5. sherrgibbs
    Member
    Posted 5 years ago #

    I was interested in customizing the Nav bar. You can customize the Nav bar to use links instead of pages in the header by using the wp_list_categories function. For example:

    <?php wp_list_categories('title_li=&incude=16'); ?> <?php wp_list_categories('title_li=&incude=27'); ?> <?php wp_list_categories('title_li=&incude=28'); ?> <?php wp_list_categories('title_li=&incude=31'); ?>

    However, each of those parent categories listed has TONS of children and they obviously won't fit in the Nav bar. I've basically given up that idea and just got over it.

  6. sherrgibbs
    Member
    Posted 5 years ago #

    PS: I should have also said that new children are added to the parent categories constantly and to individually "exclude" each one would be a nightmare and tons of extra work. The depth=1 didn't work for me, but then again, I could have put it in wrong.

  7. MichaelH
    Member
    Posted 5 years ago #

    That is a bug and Trac Ticket 8614 does have a fix. That fix will be in 2.7.1 and will need use of the 'exclude_tree' parameter.

  8. sherrgibbs
    Member
    Posted 5 years ago #

    The whole Trac Ticket thing is like reading Japanese to me, but I do appreciate you responding.

Topic Closed

This topic has been closed to new replies.

About this Topic