WordPress.org

Ready to get started?Download WordPress

Forums

Unlinking Parent Category (10 posts)

  1. neveremail
    Member
    Posted 7 years ago #

    I am looking for a way to have parent categories that are unlinked.

    For example like they are on http://www.cinematical.com/
    e.g
    Genre (Parent Category unlinked)
    Horror (child linked)
    Thriller (child linked)
    Comedy (child linked)

    Type (Parent Category unlinked)
    TV (child linked)
    Movie (child linked)
    Cartoon (child linked)

  2. neveremail
    Member
    Posted 7 years ago #

    does anyone have any ideas on this one?

  3. neveremail
    Member
    Posted 7 years ago #

    anyone?.....

  4. estjohn
    Member
    Posted 7 years ago #

    Not sure.. that isnt a wordpress powered site, its blogsmith.
    Only way I can see doing that in WP off the top of my head is making a static menu with custom links to categories instead of a dynamic menu.

    Have you searched for category plugins?

  5. neveremail
    Member
    Posted 7 years ago #

    Yes I have - Could not find any that did it....

  6. neveremail
    Member
    Posted 7 years ago #

    Does anyone else have any ideas?

  7. Evita
    Member
    Posted 7 years ago #

    From the codex:
    Show Children Only of Category

    Displays Category links sorted by ID (sort_column=id), without showing the number of posts per Category (optioncount=0), showing only the sub-Categories titles (use_desc_for_title=0), for just the children of Category ID 8 (child_of=8).

    <?php wp_list_cats('sort_column=id&optioncount=0&use_desc_for_title=0&child_of=8'); ?>

    Note: If there are no posts in a parent Category, that parent Category will not display.

    Hope, this helps.

  8. neveremail
    Member
    Posted 7 years ago #

    Thanks for the idea EVita but that would take the Parent categories away completely.

    I just want them to be unlinked and appear in bold.

  9. Evita
    Member
    Posted 7 years ago #

    Yes, but you can make a list of child categories for each parent category and put name of the parent category by hand.

    <h2>parent category 1</h2>
    <?php wp_list_cats('sort_column=id&optioncount=0&use_desc_for_title=0&child_of=1'); ?>

    ...

  10. asmian
    Member
    Posted 7 years ago #

    Heh, this is nearly what I was looking for. What I want to do is similar, but I want to suppress all the count of articles in child categories, so my top-level parents are bold headers if they are just container categories (contain no allocated posts of their own) or list as their article count ONLY the posts allocated to them directly, without the counts of their children added.

    I am trailing through the include functions trying to track down where the children count get added to the parent categories, so I can suppress this function, but without any documentation for any of these functions it's a nightmare... I'm a programmer, and I do pity the non-technical users trying to change a small display setting like this without having to hack so much undocumented code.

Topic Closed

This topic has been closed to new replies.

About this Topic