WordPress.org

Ready to get started?Download WordPress

Forums

Get the_excerpt from a single page with known ID (1 post)

  1. fidal
    Member
    Posted 5 years ago #

    Hey there,

    I need to somehow get the excerpt of a certain page with known ID to be shown on my front page.

    What I tried to put into my home.php at the right spot was this:
    <?php $my_query = new WP_Query; $my_query->query('p=68');
    while ($my_query->have_posts()) : $my_query->the_post(); ?>
    <p>the_excerpt();?></p>
    <?php endwhile;?>

    But nothing happens... What am I doing wrong?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags