show child category of parent (conflict) (1 post)

  1. fernon
    Posted 3 years ago #

    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,


Topic Closed

This topic has been closed to new replies.

About this Topic