• Hello,

    I hope that someone could help me:

    I want to put a manual excerpt in the “Latest Article” section on my home page, so I have nice and neat text instead of all the links from audio and video inputs etc. But I keep strugling, because when I add the_excerpt function, it shows the both: the manual exceprt of the post I’ve added and the original automated post excerpt.

    Could you please help me, my website:http://www.agytalks.com

    here is the code I use to display the latest articles:

    <?php
    $recentBlog = new WP_Query();
    $recentBlog->query('showposts=1');
    while($recentBlog->have_posts()) : $recentBlog->the_post();
    ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • Howdy,

    We need a bit more code than that. UP to the “the_post()” part, the loop is just getting the next post info ready to display.

    What code comes after that?
    Note: If it is long (more than 10 lines or so) please use PasteBin to paste the code in and provide the shortened URL here.

    Probably something I can help with.

    Take care,
    Paul

    Thread Starter agytalks

    (@agytalks)

    Oh thanks..was a bit tired before, now with fresh mind saw the problem, I was ignoring the code below, cause thought it was for different part of the page but it was actually part of the loop. I just needed to replace the_content_rss with <?php if (function_exists('has_excerpt') && has_excerpt()) the_excerpt();?>

    Thank You for pointing that out !

    Great — glad all seems well now!
    Take care,
    Paul

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Manual excerpt in latest article section’ is closed to new replies.