• I’m using WP 2.9.2 with K2 1.0.3. I want to change the behavior of the archive page, so that it only displays a summary of a post instead of the whole text. Can’t seem to find the script that controls this page:
    https://www.mylifeincollege.net/2010/05/

    Can someone enlighten me on where that script lives? Also, what variable will I change to display only the post summary, plus a link “read on” to the whole post?

Viewing 3 replies - 1 through 3 (of 3 total)
  • It would be the archives.php page that you want to edit and you would simply replace <?php the_content(); ?> with <?php the_excerpt(); ?>.

    It looks like you are using the K2 theme which has a different structure, so there is no archives.php. Instead, do this:

    • Under your k2 theme directory, find the file blocks/k2-loop.php and copy it to blocks/k2-loop-monthly-archive.php.
    • Change this line:
      <?php the_content( sprintf( __('Continue reading \'%s\'', 'k2_domain'), the_title('', '', false) ) ); ?>

      to this:

      <?php the_excerpt(); ?>
      <a href="<?php the_permalink(); ?>" title="Permanent link to <?php the_title(); ?>">Read more... </a>

    OOPS – the new file name should be blocks/k2-loop-archive-month.php, not blocks/k2-loop-monthly-archive.php!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Archive page script’ is closed to new replies.