WordPress.org

Support

Support » How-To and Troubleshooting » How can i make all internal links open in same window and external links in new

How can i make all internal links open in same window and external links in new

  • I am using wordpress 3.4.2
    When used following code

    [ Moderator note: please put the backtick on a line above and below your code example, it doesn’t format correctly otherwise. ]

    <a> " target="_self">Test</a>
    	<a href="http://www.google.co.in/">Google with http and no other attributes</a>
    	<a href="http://www.google.co.in/">Google with http and target=_self</a>
    	<a href="google.com">Google without http</a>

    It is generating folowing HTML code

    <div id="links">
            <a href="http://myworks.eka/projects/local-dev/welthungerhilfe/?p=188">This internal link</a>
            <a href="http://www.google.co.in/">Google with http and no other attributes</a>
            <a href="http://www.google.co.in/">Google with http and target=_self</a>
            <a href="google.com">Google without http</a>
            </div>

    How can i make all internal links open in same window and external links in new tab or window?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How can i make all internal links open in same window and external links in new’ is closed to new replies.