Join our new community forum for support & discussion

Join Now

Home Support Themes RentalHive How to add category descriptions to category pages

How to add category descriptions to category pages

  • Author
    Posts
  • sowickesited

    I’m using the RentalHive theme.

    How can I add the category descriptions to the top of each category archive page?

    I don’t see theme files for archive.php or category.php

    yevhen developer

    It is already implemented on category page (there is text under category title). To change category description just edit it in Listings/Categories

    sowickesited

    Sorry, I should have mentioned that I was asking about blog categories, not listing categories.

    But that’s useful info about the listing pages. I didn’t know that and added descriptions for those too.

    yevhen developer

    Sorry for confusion, for blog categories you can try using this function https://developer.wordpress.org/reference/functions/category_description/ and add a custom category.php template to the child theme.

    sowickesited

    Thank you.

    For anyone else that might find this topic useful, I was able to add the category title and description on the blog pages by copying the index.php file from the RentalHive theme folder to my child theme folder and named it category.php

    Then I simply added the category title using this function:
    https://developer.wordpress.org/reference/functions/single_term_title/

    <?php single_term_title(); ?>

    And I added the category description using this function:
    https://developer.wordpress.org/reference/functions/category_description/

    <?php echo category_description(); ?>

    ihor developer

    Thanks for sharing!

Viewing 6 posts - 1 through 6 (of 6 total)

New Reply

This forum has been archived and is no longer accepting new posts or replies. Please join our new community forum for support & discussion.