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

    Hi, on my websites – created with the Enfold theme – I want the portfolios to open in a new tab. Would you be so kind as to advise me on how this could be done? Many thanks!

    #1289864

    Hey icphillips,

    Sorry for the late reply. Please try this in your functions.php file:

    function ava_add_target_blank_masonry() {
    ?>
    <script>
    	jQuery(document).ready(function($) {
    		$('a.av-masonry-entry').attr('target', '_blank');
    	});
    </script>
    <?php
    }
    add_action( 'wp_footer', 'ava_add_target_blank_masonry');

    Best regards,
    Rikard

    #1290050
    This reply has been marked as private.
    #1290428

    Hi icphillips,

    Yes, you’ll just need to copy and paste the code at the bottom of functions.php.
    However, we don’t recommend it in the parent theme (enfold) since it will be overwritten during an update, we suggest putting it in a child theme’s functions.php file.
    If you already have a child theme, just ignore this, otherwise, you can download and find further instructions here: https://kriesi.at/documentation/enfold/child-theme/

    Best regards,
    Nikko

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