Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #842943

    hey,
    how can i make that any link will be open in new window as a default? if it will be with code, can you tell me what code wil do that?
    thank you

    #843060

    Hey hofitlev,

    Here is the code you can put in your funtions.php

    
    
    function av_links_new_tab() {
    ?>
    <script>
    	jQuery(window).load(function() {
    		jQuery('a').each(function() {
    			var el = jQuery(this);
    			el.attr('target','_blank');
    		});
    	});
    </script>
    <?php
    }
    add_action('wp_footer', 'av_links_new_tab');
    

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #843082

    hey i wrote that code and when i saved i got error massage.

    #843084

    now my site is off air and i get that massage

    • This reply was modified 7 years, 2 months ago by hofitlev.
    #843131

    Hi hofitlev,

    You can go to this file via ftp and delete the code, the site will be back up. Also please check the server log for the error.

    Best regards,
    Victoria

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.