I want posts that are set to post format link to open in a new tab. How would I do that?
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.
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
Thank you… that works!