• Resolved ArnoAnou

    (@arnoanou)


    Is there a way to edit the php of archive pages without editing the front page/blog page, too? I might want to use excerpts on the blog page but on category/tag/date archives only post titles. Is there a way to achieve this?

    Thx!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Theme Author Ben Sibley

    (@bensibley)

    Startup Blog uses the content-archive.php file for posts on the blog and all archives. You can copy that file into your child theme to override the version in Startup Blog. Then replace line 17 in the copy of content-archive.php in your child theme with the following:

    <?php 
    if ( is_home() ) {
      echo wp_kses_post( ct_startup_blog_excerpt() ); 
    }
    ?>

    is_home() refers to the blog homepage, so this way the excerpt will only be output if you’re viewing the blog and it won’t be output when viewing any archive.

    Thread Starter ArnoAnou

    (@arnoanou)

    Worked well! Thanks Ben!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP: Edit archive pages independently from the blog page’ is closed to new replies.