• Resolved readwriteandedit

    (@readwriteandedit)


    The Adamos theme shows excerpts only in search results. This is set up in content.php.

    <?php if ( is_search() ) : // Only display Excerpts for Search ?>
    	<div class="entry-summary">
    		<?php the_excerpt(); ?>
    	</div><!-- .entry-summary -->

    So in my child theme’s content.php, I changed this to
    <?php if ( is_search() || is_home() || is_front_page() )

    While this did change full posts to excerpts for home (which is not the front page), it didn’t change the two posts on the static front page to excerpts.

    I also tried <?php if ( is_search() || is_home() || is_page_template( 'page_templates/custom_home.php' ) )

    That still didn’t give me excerpts on the static front page. I tried other options as well, but I’m having no luck. Anyone have any ideas?

    Thank you.

    The Editors Blog Members

Viewing 2 replies - 1 through 2 (of 2 total)
  • If you’re using Adamos’ custom home page template, it doesn’t call content.php, so editing that file won’t help. Instead, you should copy page-templates/custom_home.php to your child theme and change:

    <?php echo content(50); ?>

    to

    <?php the_excerpt(); ?>

    You should also give it a different template name. Change:

    Template Name: Custom Home Page

    to

    Template Name: Child Custom Home Page

    Thread Starter readwriteandedit

    (@readwriteandedit)

    Thank you, Stephen. That worked perfectly.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can't make excerpts show on static front page Adamos theme’ is closed to new replies.