• Resolved egilarntzen

    (@egilarntzen)


    https://www.lofotenmusicfestival.no/wordpress

    I have made a child theme for Twenty Twelve. I can’t seem to get WordPress display the excerpts when there are excerpts….

    Both under “nyheter” (which is the news and blog page) and under “artister” (which is a category), it displays the full content…

    I have tried to make changes to both conent.php and archives.php, but no luck..

    I have also disabled all plugins and tried with twenty twelve org. theme and twenty thirteen with no luck…

    Please help.

    Cheers.

Viewing 1 replies (of 1 total)
  • Thread Starter egilarntzen

    (@egilarntzen)

    Ok, I got it working.

    I added: <?php if ( is_search() || is_category() ) : // Only display Excerpts for Search ?>.

    But I can’t get the read more showing… I have made a template called “content-artistder” and here is the relevant code:

    <?php if ( is_search() || is_category() ) : // Only display Excerpts for Search ?>
    		<div class="entry-summary">
    			<?php the_excerpt(); ?>
    		</div><!-- .entry-summary -->
    		<?php else : ?>
    		<div class="entry-content" style="background-color:red;">
    			<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?>
    			<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 'after' => '</div>' ) ); ?>
            </div><!-- .entry-content -->
    		<?php endif; ?>
Viewing 1 replies (of 1 total)
  • The topic ‘Excerpt not working’ is closed to new replies.