WordPress.org

Ready to get started?Download WordPress

Forums

Oenology
[resolved] Creating post excerpt on the Blog Home Page (3 posts)

  1. techstorm
    Member
    Posted 1 year ago #

    Hello there,
    Can someone please help with this. I would like to my posts to have excerpt on the home page. This is currently the case for Archives and search results posts.

    I saw this in the post-entry.php:

    <!-- Post Entry Begin -->
    <?php
    // only display the full content on
    // the blog home page, single blog posts,
    // and static Pages
    if (
    (
    // WordPress conditional tag that returns true if
    // the current page is an archive index page
    is_archive()
    // WordPress conditional tag that returns true if
    // the current page is a search results page
    || is_search()
    )
    // WordPress conditional tag that returns true if
    // the current page has an image mime-type attachment
    && ! wp_attachment_is_image()
    // WordPress conditional tag that returns true if
    // the current post has the 'link' post-format type
    && ! get_post_format()
    ) {
    // Output the Post Excerpt

    However, I'm still unable to figure out how to change this up to get the desire outcome.
    Thank you.

    http://wordpress.org/extend/themes/oenology/

  2. Chip Bennett
    Theme Review Admin
    Theme Author

    Posted 1 year ago #

    First, I would recommend making any changes in a Child Theme.

    This should be pretty simple to update. Copy post-entry.php into your Child Theme, and change this:

    (
    // WordPress conditional tag that returns true if
    // the current page is an archive index page
    is_archive()
    // WordPress conditional tag that returns true if
    // the current page is a search results page
    || is_search()

    ...to this:

    (
    // WordPress conditional tag that returns true if
    // the current page is an archive index page
    is_archive()
    // WordPress conditional tag that returns true if
    // the current page is a search results page
    || is_search()
    // WordPress conditional tag that returns true if
    // the current page is the blog posts index
    || is_home()
  3. techstorm
    Member
    Posted 1 year ago #

    Thank you. This did the trick. You have been very helpful once again.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags