waviaei
1/20/2013 - 7:24 AM

WordPress: when "read more" link is used, WordPress will automatically add "#more" anchor to the link. This is function to remove it. via h

WordPress: when "read more" link is used, WordPress will automatically add "#more" anchor to the link. This is function to remove it. via http://webdesignrecipes.com/wordpress-functions-php-snipets/

/* remove more-anchor from read more link */
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');