Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #943189

    I’m using the portfolio items as a news grid that links to another sites news items. At present when you change the link in the portfolio item to a custom one the item configures to the same page which makes the site dissapear. I need the links to open in another page.

    you can see what i mean by viewing the big 3 news blocks made with the portfolio on the page link provided.

    #943192
    This reply has been marked as private.
    #943212

    Hi,
    :
    When you set the link can you add the attribute:

    target="_blank"

    Best regards,
    Jordan Shannon

    #944161

    ive tried adding that to the end, it doesnt work?

    just to make sure you understand where im talking about, see screenshot link.

    #945179

    Hi,

    Are you using the Portfolio Grid element? Please remove the target attribute in the url field. Edit the page with the portfolio and then add this script in a code block.

    <script type = "text/javascript">
    (function($){
        $(window).on('load', function() {
              $('.grid-entry a').attr('target', '_blank');
        });
    })(jQuery);
    </script>
    

    Best regards,
    Ismael

    #945336

    Hi thanks – yes using the portfolio grid and items – ive placed that code in a code block (the type in the pagebuilder) and deleted the target att. see screenshot links,

    sorry but still not giving me a new tab / blank page on front end?

    #945782

    Hi,

    Thank you for the update.

    The same code works on our installation. Please provide the WP login details in the private field. We would like to test it.

    Best regards,
    Ismael

    #947375

    hi sorry for delay. its seems to be working as it should now, has someone done something? we havent changed anything, your code is not even placed…?!? :)

    #947390

    Hi,

    The code should be placed, however this could have been addressed via an update.

    Best regards,
    Jordan Shannon

    #949055

    really sorry but that last post was meant to go on my other ticket about the header i have (its ok now!) – this issue however is still outstanding! :)

    can you have a look into the site and let me know if there is a solution please?

    #949969

    Hi,

    We have added this script in the functions.php file.

    // custom script
    add_action( 'wp_footer', 'ava_custom_script' );
    function ava_custom_script() {
    ?>
    <script type="text/javascript">
    (function($) {
        $(document).ready( function() {
              $('.grid-entry a').attr('target', '_blank');
        });
    })(jQuery);
    </script>
    <?php
    }

    Best regards,
    Ismael

    #951588

    Brilliant thankyou so much!

    #951946

    Hi,

    Glad we could help!
    Please take a moment to review our theme and show your support https://themeforest.net/downloads
    To know more about enfold features please check – http://kriesi.at/documentation/enfold/
    Thank you for using Enfold :)

    Best regards,
    Basilis

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘How to make a porfolio item thats set with a custom link open in a new tab’ is closed to new replies.