• Resolved mossbit

    (@mossbit)


    I am trying to stylize the excerpt to look different than the full post on the home page. I have looked through the forum and found this post with a similar issue.
    Styling a Custom Page with CSS on Twenty Twelve
    Recommended reading was http://codex.wordpress.org/Function_Reference/body_class
    and it did not making sense to me.
    the website I am working on is located at
    mossgraphics.net/test
    I want to change the .entry-header size, .entry-header .entry-title, .entry-content p .entry-summary p – if I change these I change the excerpt and the full post as well.
    I have tried to create my own loop for just the front page, but I am not having much success being so new at wp. I would very much appreciate any help I can get.
    Oh and yes I am using a CHILD THEME.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Sure, it’s likely just a matter of CSS – are the excerpts you want to change anyplace other than then home page?

    (Totally nice site BTW!)

    Thread Starter mossbit

    (@mossbit)

    Now that you mention it it is for all the categories as well because they have excerpts too. I am not using Archives at the moment

    Okay, so the way to target certain pages is by looking at the classes that are generated in the body tag – for your categories page it’s this:

    <body class="archive category category-classes category-9 custom-background custom-font-enabled single-author">

    For home:

    <body class="home blog custom-background custom-font-enabled single-author">

    So just add those before each CSS declaration – you have to repeat the CSS for each one:

    .home .entry-header,
    .category .entry-header,
    ....  {
      styles;
    }

    See if that works for you.

    Thread Starter mossbit

    (@mossbit)

    I am assuming I place my <body class=" "> in my category.php file and another in my home.php file. Do I place this before the loop? or at the bottom.
    I get what I have to do with the .css

    thanks so much for this and your quick response

    Those classes are already there 🙂 (don’t make it harder for yourself – LOL) – I copied that code right off your site – using View Source in your browser or a tool like Firebug – you can see the HTML code…

    Thread Starter mossbit

    (@mossbit)

    Thanks sometime I do make things harder than they are. Its a reminder I should stop for the night and continue again in the morning.
    It worked:)

    LOL – we all do that – especially when we’ve been doing a bit too much of this kind of thing. Mountains are always a good antidote IMHO! (I’m a total mountain person – now mostly in the Sierra but lived in Seattle for 6 years a while back so I appreciate your site…)

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Twenty Twelve create different CSS Styling For Excerpts & Full Posts’ is closed to new replies.