• Hi,

    Currently my theme has this in the main index template.php:

    <?php if (is_search()) the_excerpt(); else the_content(__(‘Read the rest of this entry »’, ‘kubrick’)); ?>

    which means full posts everywhere, except in the SERPS, correct?

    Now, if I were to add this:

    <?php if (is_search()) { ?>
    <?php the_excerpt() ?>
    <?php } elseif (is_category()) { ?>
    <?php the_excerpt() ?>
    <?php } elseif (is_year()) { ?>
    <?php the_excerpt() ?>
    <?php } elseif (is_month()) { ?>
    <?php the_excerpt() ?>
    <?php } elseif (is_day()) { ?>
    <?php the_excerpt() ?>
    <?php } else { ?>
    <?php the_content(‘Read the rest of this entry »’); } ?>

    this would mean excerpts everywhere, but not on single posts, am I right?

    In other words (and just so I understand correctly), if a reader were to go to my homepage, they would see excerpts of my posts and if they clicked on the permalink, they would be taken to the full single post. Now, if I wanted a read more link at the end of the excerpt, that’s another line of code that should be added to the above block of PHP, correct? I’m a newbie to PHP, but I think I did good. I just want to run it by you guys to confirm I got it right.

    Thanks in advance,

    Mike
    http://mikesblogmarketingtips.michaeldroberson.com

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Using excerpts everywhere but the single post page’ is closed to new replies.