Support » Fixing WordPress » show child category of parent (conflict)

  • I searched all over the internet but my problem is a bit complicated. I wanted to show the children of my category parent in the submenu. (The code works perfect!).

    But the problem is that the normal pages without children, shows up all the categories in the submenu. It shouldn’t show anything.(Since the page doesn’t have a child)

    Hope you guys can help me out with this! I appreciate it!

    I hope my explanation is clear enough.

    The code I used to display the children of the categories is:

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your code may now have been permanently damaged/corrupted by the forum’s parser. ]

    if (is_category()) {
    $this_category = get_category($cat);
    $this_category = wp_list_categories('orderby=id&show_count=0
    "&echo=0"); else
    $this_category = wp_list_categories('orderby=id&depth=1&show_count=0
    if ($this_category) { ?>

    Like to hear from you soon

    Kind Regards,


  • The topic ‘show child category of parent (conflict)’ is closed to new replies.