Before you ask please READ THIS

Display category description

Hi !

I would like to display the category description with the possibility to allow html in it (I would like to show a link saying "go back to".

So, do you know where I can change the file just to display the category description ? And once I get the file changed, can I install a plugin to allow html in category description ?

I can't find any category.php...

Thank you for your help,

Sophie

Comments

  • Posts: 121
    Hello, I would really need your help, thank you !
  • AirAir
    Posts: 10,603
    Hello Sophie :-)
    contentologue said: category description with the possibility to allow html
    First thing first - a category of posts, or some other custom post type? Where you would like it to display?

    If you would like to display a category of posts, you can edit the file index.php in the theme directory.

    Go to line ~83 and change this
    <div class="content-box<?php echo esc_attr( $pagination_class ); ?>">

    to:
    <div class="content-box<?php echo esc_attr( $pagination_class ); ?>">
    	<?php
    	if ( is_category() ) {
    		echo category_description();
    	}
    	?>

    For me, it seems, that with the active Yoast SEO plugin I can add HTML just fine in the description :-)


    With kind regards.
  • Posts: 121
    Perfect thank you so much !
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion