Customizing "read more"…anchor not working?
-
Hi everyone.
I’m trying to customize the “read more” link on my site. I added this snippet from the codex page to the bottom of my functions.php file:
add_filter( 'the_content_more_link', 'modify_read_more_link' ); function modify_read_more_link() { return '<a class="more-link" href="' . get_permalink() . '">Your Read More Link Text</a>'; }It registers the class, but the #more anchor is removed so that when you click on the link it just takes you to the permalink without scrolling. I’ve tried adding ?> after with no luck. I have my reading setting as “full text” and not “summary” so I’m not using the_excerpt.
Any idea what I’m doing wrong here? Thank you in advance.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Customizing "read more"…anchor not working?’ is closed to new replies.