The more tag

Viewing 2 posts - 1 through 2 (of 2 total)
  • #13082
    juanberlin
    Participant

    Hi, I have been searching in the Internet. The thing is, I run a blog with news in easy spanish for learners, and I get the impression because of Google Analytics that some people think the Homepage is all there is to it, and they dont actually click on the post titles to read the whole thing.

    I would want to have a “read more” link kind of thing. However, when I insert the more tag, there is no link at all. It is supposed that if I modify in the edito of a particular post the more tag for example like this:

    There should be a clickable “Read more”, but it doesn’t happen. I’m thinking it might be because of the theme properties.

    Since I’m a newbie, I don’t know how to fix this. Anyone has any suggestions?

    Thanks so much.

    #13115
    Daniel Tara
    Keymaster

    That is because posts display the excerpt and not the content. To add a more link to excerpts add this code in functions.php:

    function pinboard_more_link( $excerpt ) {
    	return $excerpt . ' <a href="' . get_permalink() . '">Read More &rarr;</a>';
    }
    
    add_filter( 'the_excerpt', 'pinboard_more_link' );
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.