Support » Fixing WordPress » Showing single most recent post excerpt

  • I’ve been searching for hours now with no luck so I’d thought I’d post this as a question.

    1) Is there a way for me to show an excerpt of the single most recent post on a WP page? When you click the page, I only want it to show an excerpt of the most recent post.

    2) Is there a way to limit the number of characters shown in the excerpt mentioned in #1?

    I saw this in the tonus theme in the sidebar code and wonder if I can adapt it for the page code.

    ——————

    <h2><?php _e(‘recent posts’); ?></h2>

    ——————

    Much thanks for any help or suggestions offered.

Viewing 1 replies (of 1 total)
  • Check the codex for the usage of query_posts, what you’ll have to do is something similar to this:

    Use query_post with showpost=1, then run The Loop and instead of displaying “the_content” display “the_excerpt”. The_excerpt is a fixed amount set in wordpress, I think the first 200 characters.

Viewing 1 replies (of 1 total)
  • The topic ‘Showing single most recent post excerpt’ is closed to new replies.