Support » Plugins » [Plugin: Post Teaser] No teaser on homepage

Viewing 4 replies - 1 through 4 (of 4 total)
  • Yes, there is an easy way and it is independent of the plugin.

    Do you your way around WordPress conditional tags? The one you need is is_home() – see the codex page for details and examples.

    You’ll need to insert the tags into the post teaser code.

    Hey Julia, thanks for the response. I’m ok with PHP, but could do with some advice on where to place this is_home() line.

    Hi thesambarnes,

    Unfortunately, no easy way because Post Teaser do not yet support configurable teasing depending on which page. There is two ways to do what you want to do. Both ways is kind of a hack at bast but should do what you want it to do.

    1. hack post-teaser.php to remove the is_home() check. Should be easy to locate by searching with your editor.

    2. In your theme, edit your php file for the homepage. If you share a php file for more then one page (e.g. archive page, search page, etc) you will need to add a is_home() page check and if is_home() is true, unhook Post Teaser by using this: remove_filter('the_content', 'pt_process'); Remember to do this before the loop.

    I recommend method #1 if you change your theme quite a lot. #2 if you don’t want to edit post-teaser.php every time you upgrade Post Teaser to a new version or you don’t care about upgrading Post Teaser.

    If you need more help, contact me with my contact form.

    This is interesting because I have the full post on my front page and only want the excerpt. I used the following code to put the post on my static front page, but now it just shows the whole post while everything else works fine.

    <?php $my_query = new WP_Query('showposts=1'); ?>
    <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
    <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">
    <?php the_title(); ?></a>
    <?php the_excerpt(); ?>
    <?php endwhile; ?>

    Any suggestions on getting just the excerpt to show up? Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Post Teaser] No teaser on homepage’ is closed to new replies.