Read more code in child theme in functions.php (pro)
-
I pasted a code in my child theme in functions.php.
So that if you are on the homepage reading the first part of an article, then click on read more (meer…) and then not start at the top of the article again, but straight to the part where you want to continue reading.
My problem: I doesn′t work.
I used the following code:
function remove_more_link_scroll( $link ) {
$link = preg_replace( ‘|#more-[0-9]+|’, ”, $link );
return $link;
}
add_filter( ‘the_content_more_link’, ‘remove_more_link_scroll’ );
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Read more code in child theme in functions.php (pro)’ is closed to new replies.