WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] meta data not showing parent categories where is says "posted in" please help. (5 posts)

  1. 5ummer5
    Member
    Posted 5 years ago #

    In the meta data underneath a post it would say for example "no comments | posted in Articles | Edit"

    Where is says "posted in" its only showing the child category and not the parent as well. I need both displayed so it would say "no comments | posted in Work and Careers, Articles | Edit"

    I have tried googe but cant find anything to resolve the issue. I have found the section of code that needs to be changed <?php the_category(', ') ?> in the "index.php". What I did find on google is that this code should display both parent and child as standard but it doesnt seem to be doing it for me.

    Any Ideas?

    Thanks for any help!

  2. whooami
    Member
    Posted 5 years ago #

    http://codex.wordpress.org/Template_Tags/the_category

    Note: Default is a link to the child category, with no relationship exhibited.

    youre using the default.

  3. 5ummer5
    Member
    Posted 5 years ago #

    Ah ok thanks, Ive had a read through and now know that it needs to be set to

    'multiple' - Display separate links to parent and child categories, exhibiting "parent/child" relationship.

    But where do I set that option i cant find it anywhere?

    Thanks whooami, your help is much appreciated!

  4. whooami
    Member
    Posted 5 years ago #

    try this,

    <?php the_category(' , ', 'multiple') ?>

  5. 5ummer5
    Member
    Posted 5 years ago #

    That is fantastic! Worked a treat!

    Thank you very much for your help!

Topic Closed

This topic has been closed to new replies.

About this Topic