Tagged: masonry, new window, portfolio grid, thumbnail
-
AuthorPosts
-
November 5, 2014 at 1:28 am #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?November 5, 2014 at 4:14 pm #346592Hey 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,
YigitNovember 5, 2014 at 5:06 pm #346634Thank 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?
November 5, 2014 at 5:14 pm #346641Hey!
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,
YigitNovember 5, 2014 at 6:53 pm #346698Unfortunately, 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.rNovember 5, 2014 at 10:18 pm #346783 -
AuthorPosts
- The topic ‘Portfolio Grid links not opening in new window’ is closed to new replies.