ThemeShaper Forums » Thematic

[closed]

Archive manual or custom excerpt has no link to post

(4 posts)
  • Started 4 years ago by rdhenry
  • Latest reply from rdhenry
  • This topic is resolved
  1. rdhenry
    Member

    I manually or custom create excerpts in my theme. On any archived page, i.e., search, category, tag, etc., excerpts are produced without ellipsis or any kind of read more.

    How can I force manually or custom created archive excerpts to be appended with a read morelink to the full post or page?

    Posted 4 years ago #
  2. rdhenry
    Member

  3. rdhenry
    Member

    Ultimately used the solution in the previous post, combined with the solution found at http://forums.themeshaper.com/topic/noob-customize-read-more-quicktaghow
    So my custom excerpts on archive and search pages are appended with the following text link to the full post Read the rest of "PostTitle"

    /* Add Read more of PostTitle link to custom excerpts on archive or search pages */
    function mytheme_excerpt($post) {
    	if(is_archive()||is_search()) {
    		$post = '<p class="excerpt">' . get_the_excerpt() . ' ' .
                    '<a href=' . get_permalink() . '>Read the rest of "' . get_the_title('', '', false).'"</a></p>';
    	}
    	return $post;
    }
    add_filter('thematic_post', 'mytheme_excerpt');
    Posted 4 years ago #
  4. rdhenry
    Member

    Code correction:

    /* Add Read more of PostTitle link to custom excerpts on archive or search pages */
    function mytheme_excerpt($post) {
    	if(is_archive()||is_search()) {
    		$post = '<p class="excerpt">' . get_the_excerpt() . ' ' .
                    '<em> ... Read the rest of</em> <a href=' . get_permalink() . '>"' . get_the_title('', '', false).'"</a></p>';
    	}
    	return $post;
    }
    add_filter('thematic_post', 'mytheme_excerpt');

    If anyone knows how to include the "Read the rest of" part in the anchor, plz let me know!

    Posted 4 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.