WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] get category name and children category name on different page

[Resolved] get category name and children category name on different page

  • Hi Guys !

    i have a menu with catgory and (multiple) children category.

    they are identic as my menu.

    i want to have on ma category page :

    the title of the parent category (ex : apple)
    the title of the children category (like the menu) (ex : iphone)

    i use this code :
    <p>Category: <?php single_cat_title(); ?></p>

    but i always have only the catgory title where i am, not the parent and/or the children.

    with this code i don’t have the good result two.

    <?php //echo(get_category_parents($cat, false, '<br />, ')); ?>

    on the iphone page for exemple i want to have :

    category : apple
    sub category : iphone

    is someon as an idea i don’t have find the answer since few days on the wordpress codex,

    thanks !

  • The topic ‘[Resolved] get category name and children category name on different page’ is closed to new replies.
Skip to toolbar