WordPress.org

Support

Support » Plugins and Hacks » Most recent post emphatized

Most recent post emphatized

  • I want some post in the home page, of whom just the first with a bigger font and an image.
    Later, when i add a new post, only the last one will be emphatized automatically and the older will become unemphatized like all the others.
    How can i do that?

Viewing 1 replies (of 1 total)
  • A way to do this is to make the first post have its own unique class and modify it with CSS rules. I called mine ‘post-first’, where normally it is just ‘post’. In your main template you’ll find the line:

    <div class="post">

    If you replace that with this:

    <div class="post<?php if(!is_single() && $post==$posts[0]) echo '-first';?>">

    The first post will be .post-first. I discovered this method in this thread.

Viewing 1 replies (of 1 total)
  • The topic ‘Most recent post emphatized’ is closed to new replies.