Forums

<!--more--> quicktag on other page (2 posts)

  1. vipersdream
    Member
    Posted 3 years ago #

    Hello,

    I am trying to accomplish the following:

    Create a static home page for my site and a separate blog home page. I want the blog home page to use the '<!--more-->' quick tag just like the home page does.

    I am able to get the content I want on the blog home page BUT the "continue..." isn't working so the whole post shows instead of the teaser with the continue link. What am I missing? How can I make the '<!--more-->' quicktag (or equivalent) work on a page other than the home page?

    I tried using '<?php the_excerpt('Continue...'); ?>' in the page template code but that doesn't allow the images in the post nor does it allow users to continue via a continue link to the rest of the post.

    Thanks,

    Jared

  2. Vaughan van Dyk
    Member
    Posted 3 years ago #

    Hi Jared,

    In your blog page's template code, double-check how you're calling the posts to be displayed. You should be using the_content template tag and passing the text you want to display for the more link. For example,

    <?php the_content('Read more...'); ?>

    As you found, the_excerpt tag merely shows the opening text from your post in plain text (i.e. excluding pictures). It also does not provide a link to read the rest of the post.

    Hope that helps.
    Vaughan

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags