Modify target of "Read More" link when using the_excerpt
-
Hi all,
I’m stuck. I’m working on a site that has a Parallax Banner that takes up most of the screen height.
I’m trying to modify the function that creates my “read more” links after my excerpts in my Recent Posts to link to #content id in my single.php.
I’m using the suggestion from the Codex on Customizing the Read More, (see below) but I don’t know enough .php to be able to insert the anchor tag (#content) that I’d like to postpend to the get_permalink without breaking the code.
// Replaces the excerpt "Read More" text by a link function new_excerpt_more($more) { global $post; return '<a class="moretag" href="'. get_permalink($post->ID) . '"> Read More...</a>'; } add_filter('excerpt_more', 'new_excerpt_more');
Thoughts?
Many thanks in advance!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Modify target of "Read More" link when using the_excerpt’ is closed to new replies.