Support » Fixing WordPress » Retrieve excerpt from a page

  • Hi there, I am trying to create a loop that loads a random image from any posts, whilst also retrieving the excerpt of a specific page. I have done the random post part, but cannot get it to retrieve the page excerpt. I have installed the function to get page excerpt support etc. but I think I am doing something wrong within the loop, any help would be appreciated.

    <div class="postimage">
    <?php if (have_posts()) :
    while (have_posts()) : the_post(); ?>
    <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('blog-post-image'); ?></a>
      <div class="borderimage"></div>
      <div class="tagline"><h1><?php the_excerpt('$page_id=8'); ?> </h1>
    <?php endwhile; else : endif; ?>

    [No bumping, please.]

  • The topic ‘Retrieve excerpt from a page’ is closed to new replies.