• Resolved wfeu

    (@wfeu)


    Im doing a twenty twelve site with a child theme. Im trying to add excepts. I have them on the main blog page and search.

    Im trying to figure out where – how to add them for Authors Archive and Archives.

    I added in content.php
    <?php if ( is_search() || is_home() ) : // Display Excerpts for Search and Homepage ?>

    and functions.php

    // Remove the ... from excerpt and change the text
    function change_excerpt_more()
    {
      function new_excerpt_more($more)
    	{
    	// Use .read-more to style the link
    	  return '<span class="continue-reading"> <a href="' . get_permalink() . '"> Continue Reading ?</a></span>';
    	}
      add_filter('excerpt_more', 'new_excerpt_more');
    }
    add_action('after_setup_theme', 'change_excerpt_more');
    
    function custom_excerpt_length( $length ) {
    	return 100;
    }
    add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );

    Thanks

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

    (@wfeu)

    Got it, thanks.. In content.php I added

    <?php if ( is_search() || is_home() || is_archive() || is_author() ) : // Display Excerpts for Search and Homepage ?>

Viewing 1 replies (of 1 total)
  • The topic ‘Twenty Twelve Child Theme Excerpts Authors & Archives’ is closed to new replies.