Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #346298

    Hi everyone,

    I’m seeking to have my Portfolio Grid items open in a new window. I’ve selected this option, but the behavior is such that they open in the same window. Here is a screenshot showing that I have selected this in the Portfolio Grid layout builder.

    http://cl.ly/image/191v3o2Z3E1t

    Here’s the URL to the actual site – http://busycreator.com/resources

    I’ve researched several threads on this forum, most of which ask the user to modify the theme files to insert target="_blank" somewhere in the code, but none of those solutions worked for me. The links still open in the same window.

    Can you offer any insight into a potential solution? It should be noted that each item is given a Custom Link in the Portfolio Item itself.

    I’m using Enfold 2.9.2 at the moment, and I have a child theme enabled.

    Alternatively, I’d rather use a Masonry element in place of a Portfolio Grid, but I found that the Masonry items were huge and unwieldy. I prefer the Portfolio Grid because they thumbnails display smaller and more elegant; the number of columns can be set more easily. Is the target="_blank" behaviour easier to achieve using Masonry? If so, can I alter the default size of each item?

    #346592

    Hey Prescott!

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

    function add_custom_port_target(){
    ?>
    <script>
    jQuery(window).load(function(){
    jQuery('a.grid-image').attr('target','_blank');
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_port_target');

    Regards,
    Yigit

    #346634

    Thank Yigit, that did the trick! I added it to my child functions.php so I didn’t have to edit the original.

    Any insight to the second part of the question, about making Masonry elements smaller, perhaps in 6-column view like the Portfolio Grid?

    #346641

    Hey!

    Please add following code to Quick CSS in Enfold theme options under General Styling tab

    .av-masonry-entry { width: 15%; }

    You may need to adjust the value to fit perfectly

    Regards,
    Yigit

    #346698

    Unfortunately, the above adjustment to Masonry didn’t work. I’ll stick with Portfolio Grid for now.

    I managed to shrink the Masonry elements by setting the class .av-inner-masonry { width: 15%; } but they were still arranged in two columns instead of six, leaving acres of empty space on all sides. I’ll play with it more in the upcoming weeks, but for now don’t worry about it.r

    #346783

    Hey!

    I am closing this thread for now then. Please feel free to start a new one if you have any other questions or issues :)

    Best regards,
    Yigit

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Portfolio Grid links not opening in new window’ is closed to new replies.