read more instead of excerpt doesn't work correctly
-
I wanted to add a read more link instead of the standard [..] to posts. I used the following code which I found in the codex and I placed it in functions.php:
// Replaces the excerpt "more" text by a link function new_excerpt_more($more) { global $post; return '<a class="moretag" href="'. get_permalink($post->ID) . '"> Read the full article...</a>'; } add_filter('excerpt_more', 'new_excerpt_more');
That works fine but when I go to the posts page its displaying the text below at the top left corner of the post page.
Read the full article..."> Read the full article..."/>
I can’t really make sense of where that text comes from. No extra code was added except for in functions.php and some CSS to style the link
CSS code.moretag { display:block; }
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘read more instead of excerpt doesn't work correctly’ is closed to new replies.