• Resolved suzatonic

    (@suzatonic)


    My site’s navigation consists of a couple of static pages and several category archive blog pages. I would like to format the titles on the static and category pages (e.g. ‘CATEGORY: THE BODY,’ although I’ve removed the ‘CATEGORY:’ part) slightly larger than the post titles. I have created a new class for the category-title, but can’t figure out how to differentiate between the entry-titles for posts and pages. It seems like there should be some php function that says that if_post then I can designate a class post entry titles, and if_page, I can designate a class for page entry titles that I can then format accordingly in my CSS. (of course I only need to distinguish one of them.) Any ideas?

    I am building a child theme off of twentyeleven. I’m new to coding, so go easy on me. The site is: http://www.medicine4thepeople.com.

    Thanks so much in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You can style them differently using some custom CSS. In your child theme’s stylesheet, try this:

    .page .entry-title {
    color: green;
    }
    
    .post .entry-title a {
    color: purple;
    }

    The first rule sets the color of your static pages’ titles to green, and the second rule sets the color of your post’s titles to purple.

    Thread Starter suzatonic

    (@suzatonic)

    Hi Stephen,

    You’re awesome! I figured it was something reasonably simple. I wasn’t using correct syntax for the class designation, so it wasn’t working. Thanks so much! You saved the day!

    Suzi

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How can I format entry-titles differently for posts vs static pages’ is closed to new replies.