WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Excerpt (3 posts)

  1. financialfergy
    Member
    Posted 1 year ago #

    I want to create a postings page which shows the entire new article but then crops any older one. I've used Advanced Excerpt and it works great but it does them all.

    I am very new so please if you tell me codes, be specific and explain in details.

    Thanks.

    http://www.fergusonfinancial.ca/news/

    Devon

  2. keesiemeijer
    moderator
    Posted 1 year ago #

    In the blog-excerpt.php file of your theme change this:

    <?php the_excerpt(); ?>

    to this:

    <?php
    if ( $wp_query->current_post == 0 ) {
    	the_content();
    } else {
    	the_excerpt();
    }
    ?>

    btw:
    consider creating a child theme instead of editing your theme directly - if you upgrade the theme all your modifications will be lost.

  3. financialfergy
    Member
    Posted 1 year ago #

    I did this but now if I click on the link to my post either through recent posts or to view post in my dashboard, all I see is the title of the post and not the actual content.

    Thanks.

    http://www.fergusonfinancial.ca/articles-worth-reading/

    Try clicking on a post title.

    Devon

Topic Closed

This topic has been closed to new replies.

About this Topic