Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #442837

    I want posts that are set to post format link to open in a new tab. How would I do that?

    #443289

    Just in case that was not clear, I mean when clicking on the post title, I want the external link to open in a new tab.

    #443294

    Hi!

    Please add following code to Functions.php file in Appearance > Editor

    function add_custom_target(){
    ?>
    <script>
    jQuery(window).load(function(){
    jQuery('.post_format-post-format-link a').attr('target','_blank');
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_target');

    Regards,
    Yigit

    #443306

    Thank you… that works!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Open post format link in a new tab’ is closed to new replies.