How to use category wise background images in wordpress

How to use category wise background images in wordpress

WordPress has category feature, We can use the wordpress category for many purpose. Given plugins list to use category wise background images in wordpress.

Some time we want use category images for show the category content. Some time we want use the category wise background images in your website.

How to use category wise background images in wordpress

For category images you can use the some nice wordpress plugins.

The Categories Images Plugin allow you to add image with category or taxonomy.

Using this plugin, you can add icons (images) to sidebar of your site or blog into section of categories and pages.

For category background images you need know about body_class() method. Detailed information you can find on following page.

Body_class()

If you have wpapi category then you can use following CSS.

  • If they are there, you can use these as selectors in your CSS: body.category-wpapi { /* code here */ }, etc.
  • If not, add the body_class() function to the tag in your theme, probably located in header.php. It works like this:
    <body <?php body_class(); ?>>
How to use category wise background images in wordpress
How to use category wise background images in wordpress

Published by

Purab

I am Purab from India, Software development is my profession and teaching is my passion. Programmers blog dedicated to the JAVA, Python, PHP, DevOps and Opensource Frameworks. Purab's Github Repo Youtube Chanel Video Tutorials Connect to on LinkedIn

Leave a Reply

Your email address will not be published.