Forums

Help with index.php loop? (4 posts)

  1. BakingandBooks
    Member
    Posted 2 years ago #

    I am using a WP theme that does not allow you to use the excerpt function for your RSS feed - if you have an excerpt it is automatically displayed on your blog instead of the post content. I'd like to change this but don't know how!

    Here is the line that I think needs to be changed:

    <?php if(has_excerpt()) { the_excerpt(); }else{ the_content(custom_readmore()); } ?>

    Do you know how to change this so that I can use the excerpt for my RSS & email subscriptions without the excerpt appearing on the front page? The theme also uses WP thumbnails so currently none of my intro images are showing up in my feeds. :(

    Thank you for your time!

  2. vtxyzzy
    Member
    Posted 2 years ago #

    I think this will work for the excerpt:

    <?php if ( is_home() || is_front_page() ) {
       the_content(custom_readmore());
    } elseif(has_excerpt()) {
       the_excerpt();
    }else{
       the_content(custom_readmore());
    } ?>

    Don't know about the thumbnail problem.

  3. BakingandBooks
    Member
    Posted 2 years ago #

    Thanks for your reply! I ended up using the snippet below and that fixed everything:

    <?php the_content(custom_readmore()); ?>
  4. vtxyzzy
    Member
    Posted 2 years ago #

    Glad you got it fixed. Now, please use the dropdown at top right to mark this topic 'Resolved'.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.