• I haven’t been able to get my site to display a teaser for posts. I tried inserting this code:

    <?php the_content(‘more_link_text’, strip_teaser, ‘more_file’); ?>

    into my index.php file which did nothing that I could see. I also tried creating an excerpt in the control panel but that didn’t work either.

    I’m not familiar with the code language of the codex documentation and so far haven’t been able to figure out how to proceed by reading that.

    Would someone be willing to give me a step by step of what I need to do, written for someone who say has never used wordpress before (me) and isn’t familiar with coding language (me again).

    Any help would be much appreciated.

Viewing 8 replies - 1 through 8 (of 8 total)
  • for starters, remove the changes you made to the_content and put it back to the way it was.

    then change the_content to the_excerpt

    that will give you what you are calling teasers. after you get that working you can ask again about refining the results.

    Thread Starter fifthhouse

    (@fifthhouse)

    Hi there. Thanks very much for your help. O.K. here’s what’s happening so far.

    In my index.php file, within the “loop” I removed the
    <?php the_content(‘more_link_text’, strip_teaser, ‘more_file’); ?>
    tag that I had previously inserted, and put in the
    <?php the_excerpt(); ?>
    tag.

    I created an excerpt in my post panel, and reloaded my front page, but it still shows the entire article, which is about ten papagraphs long.

    So at this stage, the front page currently is displaying three full articles, even though I created excerpts for them.

    Thread Starter fifthhouse

    (@fifthhouse)

    Oh yeah, one other thing, I also added the <!–more–> tag into the body of the post, and the same result as above. Here is my site:
    https://www.angerwise.com

    Thread Starter fifthhouse

    (@fifthhouse)

    And I just noticed that the excerpt I created in the post panel is displaying at the bottom of the front page, at the end of the three articles. The excerpt doesn’t display a title.

    I dont think you are editing your files in the right place.

    I downloaded that theme, your index.php ought to look like this:

    https://pastebin.com/m487c8365

    Thread Starter fifthhouse

    (@fifthhouse)

    Thank you very much. I did what you suggested and its working beautifully!! What a relief. Thanks once again ??

    youre welcome, happy to help ??

    Do you mind if I chime in and ask how to take this one step further by adding an image into a teaser?

    I would like to get a result close to this:
    https://www.photoshoplady.com/

    Any ideas?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How do I display a teaser?’ is closed to new replies.