• Hello,

    I am new to WordPress and am trying to display my recent posts with title, date, featured image and excerpt on my homepage and was wondering what the best way to do this was. I am currently using the widgets on pages plugin to get a widget on my homepage content area atm. Should i:
    A) Just edit the php files
    B) use the recent posts widget and configure the php files a bit too
    C) Use a plugin such as advanced recent posts widget plugin ( i want to avoid this as to minimise the use of plugins.

    Any help would be greatly appreciated I have been stuck for ages.

    https://www.makewpwebsites.com/

    Thanks very much

    James

Viewing 8 replies - 1 through 8 (of 8 total)
  • I would edit the php. Like this:

    <?php query_posts('cat=#&posts_per_page=#'); ?>
    <?php while (have_posts()) : the_post(); ?>
    	<li>
    	<h4><a href="<?php echo get_permalink(); ?>"><?php the_title(); ?></a></h4>
    	<?php the_date(); ?>
            <?php the_excerpt(); ?>
    	<a href="<?php echo get_permalink(); ?>">
                     <?php the_post_thumbnail('large_wide'); ?>
            </a>
    	</li>
    <?php endwhile; ?>
    <?php wp_reset_query(); ?>

    Arrange and style accordingly and that should pull out everything you said you needed!

    Thread Starter jamo_dodger

    (@jamo_dodger)

    Thanks for your help Samantha Marie,

    Which php file do i edit and where abouts does this block of code go?

    Thanks

    JAmes

    Hi James,
    You can insert that on whichever page you want to place it. Your home page is either home.php or index.php depending on your theme.

    Also, your site has a password on it so I can’t look at it.

    Thread Starter jamo_dodger

    (@jamo_dodger)

    sorry samantha the password is [redacted]

    [NEVER post passwords in a public forum!]

    Thread Starter jamo_dodger

    (@jamo_dodger)

    i am using twenty eleven and i dont think there is a home.php,

    Do not edit the Twenty Eleven theme. First create a child theme for your changes.

    Yeah that. Sorry I’m used to working with my own custom themes. Child themes is the right way to go!

    hello
    i created one plugins for sub post.how can i display that post in other page..?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Have Recent Posts Plugin Display Featured Image and Excerpt’ is closed to new replies.