How To Separate Your Categories?

162. How to separate your Categories

Your posts are filed in various categories. Category information is often displayed in the post meta data section near your post or under the heading title. Various WordPress Themes highlight the post meta data section in different areas.

Display

The display of the post categories is generated through the use of the the_category()template tag and you can style how these categories are displayed.

First, you should find your category tag. It may be in one place on the front page and in one or more different places in your single post page, so you might have to do some hunting to find your various categories tags. You may also want to style one differently from the others, but you still have to find them.

The post meta data featuring your categories tag in your Theme is normally found on the index.php, single.php, or sometimes in the sidebar.php template files. You should open one or more of these template files and search for:

<?php the_category() ?>

Once you have found it, you should take another look at a generated web page of your site and determine how exactly you may want to change this information.

The the_category() template tag instructs the database to get the information concerning the post categories and display it at that point in your template file. It displays the list of categories with a space between each one. You may change this by adding the parameter inside of the tag. Begin with simple separators by playing with the category names: WordPress,Computers, and Internet News.

This much, guys! Hope this article helped you!

Share this!

Post Author: Staff

Leave a Reply

Your email address will not be published. Required fields are marked *