Category description in renew Child theme not working

Hi There,

I am trying to add category description text to Renew theme. I have created a child theme which seems fine. I have proceded to paste this code:


function add_category_description() {
if(is_category()) { ?>


<div class=“x-container max width”

<?php echo category_description(); ?>


<?php
}
}
add_action( ‘x_after_view_integrity__landmark-header’, ‘add_category_description’,99999 );

In the X child theme functions (functions.php) at the bottom I have recieved this message:


Unable to communicate back with site to check for fatal errors, so the PHP change was reverted. You will need to upload your PHP file change by some other means, such as by using SFTP.


Please could you advise on what I should do here, could it be anything to do with my site now being https??? my site is https://exeteracupuncture.co.uk/

Thank you in advance

John

Hey @johnwynparry,

That PHP has syntax errors and you’re using an Integrity stack hook in that code which will not work in the Renew stack you’re using.

The Category Description is not used in the theme and integrating it would require custom development which is outside the scope of our support. Please see our Terms.

What you can do instead is you create a page Cornerstone and add a Headline element to be used as your Category Title and Text element as your Category Description. Then, either use The Grid or Essential Grid to display your Category Posts.

You can check the setup I’ve described in this video.

Hope that helps and thank you for understanding.

Thanks will give it a try!

You’re welcome.

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