We often meet when we see famous sites that are built using wordpress when we click the menu we will see the information at the very top. The description shows a description or description of the category menu.
In wordpress, there is a column to fill in the description in the category, but the description is not displayed on the site. This description is sometimes filled in and most people also miss it. There are also those who fill in this description field to help improve wordpress SEO. Then how to display the description? Of course you can, because in this article I will show you how to display category descriptions.
Displays the Category Description
To display a category description, of course you also have to fill in the category description column by going to the menu Post »Categories. see the category column in the image that I put a red mark.
After you fill in the description column above, please place the script snippet below in the category.php or archive.php file:
<?php echo category_description( $category_id ); ?>
By placing the script above, you can already see the description displayed, but you cannot insert the html code in the column because it will not be displayed, if you cannot insert the html code, of course you cannot put images, make bold or italicized the description the. To be able to do this, you can copy the script below in your theme’s functions.php.
If you have saved and later you will see the category description displayed on your wordpress site as shown below.
Hopefully the above tutorial helps you display category descriptions on your wordpress site, and make your site more attractive and make visitors more aware of the description of the menu. But this tutorial is only to show how to display a description, to make the description look attractive you can create your own css class according to your wishes. Good luck and be creative. 🙂