Support » Fixing WordPress » WordPress Loop – Styling specific posts

  • In the loop for the index post – How could I say – if post is sticky, aside or what ever do this. else do that.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Check out Firebug. Use it to figure out which classes you need to style.

    Christine Rondeau

    (@crondeau)

    Volunteer Forum Moderator

    You can use the post class. If you look at the html output, sticky posts have the following:

    <div id="post-188" class="post-188 post type-post status-publish format-standard sticky hentry category-aciform category-cat-a category-cat-b category-cat-c category-sub tag-tag1 tag-tag2 tag-tag3">

    The class sticky is in there, so you can use that in your css and make that different.
    Check out the twentyten theme and see how they did it.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WordPress Loop – Styling specific posts’ is closed to new replies.