Title depending on category (2 posts)

  1. eliasgi
    Posted 5 years ago #

    Hi there, fellow WordPressers! :D

    I've had my blog for about one year now, and thought it might be a good idea to modify the blog a lil' for its anniversary! Haha.

    However, I write a longer text every Friday which is appreciated by many readers. It's under a certain category.

    What I would like to do is to edit the post title and font in the title if the post is in this category. Or possibly add like a picture in the header or so.

    I need an if-statement, and that's about how long I figured.

    Any suggestions on how I could work this out?


  2. Peter Boosten
    Posted 5 years ago #

    Actually, you don't have to do the if at all:

    If your theme uses the post_class() function to give your posts classes, then it will hold a class for the category as well.

    You then can create different styling in your style.css for that specific category.


Topic Closed

This topic has been closed to new replies.

About this Topic