Add description to my woodworking category page in integrity

Hi, I would like to add text to my woodworking category page (and other category pages) that will appear above the posts in that category.

For example, in the woodwork category (https://www.toolazine.com/category/woodwork/), I would like to have some information introducing the topic and the types of posts in the category. I would like to be able to add some relevant pictures about woodworking and links into the text about the most important woodworking related post on the site.

Currently, I can edit the title and sub title but the text in the “description” part does not show on the page.

What do I need to do to make the description text etc… show on that category page?

Thanks.

Hi,

Thanks for writing in!

To add the category description in archive pages.
You can add the code below in your child theme’s functions.php file.


function add_category_description() {
    if(is_archive()) {  ?>
    <div class="cat-desc">
        <div class="x-container max width"</div>
            <?php echo  category_description(); ?>
        </div>
    </div>
    <?php
    }
}
add_action( 'x_after_view_global__slider-below', 'add_category_description', 10 );

Hope that helps.

Hi Paul.r,

That for your reply. The code you specified puts the description above the heading and subheading. Is there a way that it can go below the heading and sub heading but still above the posts in the category?

Thanks.

Hi,

Please change code to this.

function add_category_description() {
    if(is_archive()) {  ?>
    <div class="cat-desc">
        <div class="x-container max width"</div>
            <?php echo  category_description(); ?>
        </div>
    </div>
    <?php
    }
}
add_action( 'x_after_view_integrity__landmark-header', 'add_category_description',99999 );

Hope that helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.