When we do looping in wordpress, and the content has <!--more-->
wordpress will cut the content in frontend view 开发者_开发知识库and give us link like "read more"
An example link of readmore: http://domain.com/foo/#204
.
How do I remove the part of #204
?
Just modify your code
Before
$output .= ' <a href="'. get_permalink() . "#more-$id\" class=\"more-link\">$more_link_text</a>";
After
$output .= ' <a href="'. get_permalink() ."\" class=\"more-link\">$more_link_text</a>";
Or this plugin
http://wordpress.org/extend/plugins/more-link-modifier/
Source: http://wordpress.org/support/topic/remove-anchor-link-from-read-more-link
精彩评论