I want to insert a v开发者_如何转开发ideo right before where the <!--more-->
tag has been placed on single post page, and the posts index.
Is there a hook to add code before or after the author's <!--more-->
tag in a post?
Thanks!
You can try a filter:
function more_filter($content) {
return str_replace('<!--more-->', 'video code <!--more-->', $content);
}
add_filter('the_content', 'more_filter', 1, 1);
Adjust the priority so the filter runs before the <!--more-->
tag is removed.
精彩评论