Category description php

Hi Team,

I want to display the category description to my blog category pages. Now I know that is not direct possible.

However, in the Facebook group @Misho gave an easy piece of php that enables it when you add to the landmark header of my child theme stack.

I addded the following code:

<?php echo category_description(); ?>

After the H1 instade the header tag. See screenshot: http://prntscr.com/iasi3v

Am i doing something wrong, or is this not possible?

Hey @dok1810,

Out of the box, the category archive’s landmark header will use the default title and description/subtitle text like this.

Setting your category’s Archive Title and Archive Subtitle will override the default text like this.

If that is not what you mean, please give us more details on what you’d like to achieve.

Thanks.

Hi @christian_y,

I would like the category title and description to be visable on my category page.

For example: http://prntscr.com/iaw2pd.

I have a category titel and description added. But they are not visable. I a trying to adjust the php so the tiitel and description show up on the page

Judging on the screenshot, it looks like you’re using Pro header? If that is the case, the landmark PHP file won’t take effect because Pro header replaces the Classic Header which the header landmark is a part of.

If you’re not using Pro, would you mind giving us WP admin access in a Secure Note so we could see your actual setup?

Thanks.

Hi @christian_y,

Yes i am using pro header. So than it is impossible to include a description in any way?

If so i have another question.

Is it possible to include category pages with descriptions if i use a plugin like Toolset or will Pro block that as well?

Regretfully, that is currently the case. Our development team might find a good way to achieve this in later versions.

I’m sorry but I could not answer this question because I personally have not tried Toolset. I’ve heard that it can override templates so that might work.

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