• playaz

    (@playaz)


    Hi

    I’m very new to WordPress and hopefully someone can help me with my issue.

    I am using https://evergreenpa.org/themes/evergreen-sports/
    this theme and what I would like to do it to always have LATEST POST displayed on this place under top slider.

    Currently it’s set so there can be only custom entry on Home and I don’t know how I could change this?

    I have tried this code but this shows full post, while I want only featured image, title, text preview, and read more buton.

    <ul>
    <?php $the_query = new WP_Query( 'showposts=1' ); ?>
    <?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
    <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
    <li><?php the_content(__('(more…)')); ?></li>
    <?php endwhile;?>
    </ul>

    Thanks

Viewing 1 replies (of 1 total)
  • Thread Starter playaz

    (@playaz)

    Update:

    • <?php the_excerpt(__(‘(more…)’)); ?>

    This fixes the preview text but how do I add featured image and read more button?

Viewing 1 replies (of 1 total)
  • The topic ‘How to display one recent post on static home page’ is closed to new replies.