• Resolved ilmattiapascal

    (@ilmattiapascal)


    Hi!

    As i wrote in the title i’m looking for a way to hide the featured image only for each last post. i need a code related to “the last post that i publish”, a sort of conditional which could say “if is home and last post, don’t put the feat image”. I need the feat image only for post after the last one. could you help me please ?? ??

    P.S.
    It’s for a daily blog.

Viewing 5 replies - 1 through 5 (of 5 total)
  • you can write some CSS like

    .posts:last-child featured img {
    display: none;
    }

    or something like that. if you post site url i can write more specific style

    possibly something like:
    <?php if( is_home() && $wp_query->current_post != 0 || is_home() && is_paged() ) the_post_thumbnail(); ?>
    in index.php (or home.php) to replace <?php the_post_thumbnail(); ?>

    Thread Starter ilmattiapascal

    (@ilmattiapascal)

    ok alchy, i ll try it thanks!

    Xavier, i can’t say the URL because i m working in local ??

    Thread Starter ilmattiapascal

    (@ilmattiapascal)

    Alchy it worked like a charm!

    i really didn’t understand so much about your code, i don’t really know anything about query stuff, but it has worked, and thank you!

    little by little my young frankenstein child theme of 2012 is growing and take the shape that i want, i’ve got only a few widgets to stylize, and then it’s ok. Thank you!

    Thread Starter ilmattiapascal

    (@ilmattiapascal)

    Resolved.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Hide the featured image of the last post’ is closed to new replies.