WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to have custom field in post editing area where can be putted the external link.

If the link is entered to this field then read more button on homepage would open external link, but if that field is not filled then to use default read more functionality and open a post.

Is there some plugin for this or some hack?

share|improve this question
up vote 2 down vote accepted

You just need to add target="_blank" to the anchor tag.

function remove_more_link_scroll( $link ) {
$link = str_replace('>',' target="_blank">', $link);
return $link;
add_filter( 'the_content_more_link', 'remove_more_link_scroll' );

I feel compelled to state that I consider forcing new tabs/windows to be very unfriendly behavior, and if you search the web you will see that I am not alone in that opinion.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.