bernd25 on ""Read More Link" jumps to top of page"
February 15, 2010 by David Olsen
Hi,
I’m using the following code to jump to the top of the page (instead of to where the more tag is set in the post), as seen here.
/* Link Jumps to More or Top of Page */
function remove_more_jump_link($link) {
$offset = strpos($link, '#more-');
if ($offset) {
$end = strpos($link, '"',$offset);
}
if ($end) {
$link = substr_replace($link, '', $offset, $end-$offset);
}
return $link;
}
add_filter('the_content_more_link', 'remove_more_jump_link');
1) Is it possible to jump to the top *only* on sticky posts (and not regular posts)?
2) If 1) is not possible, is it possible to jump to top *only* in posts from a certain category?
Thanks.






Comments
Facebook comments:
Feel free to leave a comment...
and oh, if you want a pic to show with your comment, go get a gravatar!