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

Add a Comment

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