Tagged: custom link, enfold, portfolio grid
-
AuthorPosts
-
February 26, 2014 at 4:18 am #229401
Hello,
I need my portfolio grid to have external links that open up in a new tab. I have figured out how to get them to open the link I want but the link remains in the same tab. I have tried replacing the code with code provided by Dude here….
Sadly this new code did not help. I appreciate you input!
- This topic was modified 10 years, 9 months ago by akraemer.
February 26, 2014 at 4:51 am #229418Hi akraemer!
Edit config-templatebuilder > avia-shortcodes > portfolio.php, find these codes on line 411:
$output .= "<".$link_markup[0]." data-rel='grid-".avia_post_grid::$grid."' class='grid-image avia-hover-fx'>".$custom_overlay.$image."</".$link_markup[1].">";
Replace it with:
$output .= "<".$link_markup[0]." target='_blank' data-rel='grid-".avia_post_grid::$grid."' class='grid-image avia-hover-fx'>".$custom_overlay.$image."</".$link_markup[1].">";
And this code on line 425:
$output .= "<".$link_markup[0]." data-rel='grid-".avia_post_grid::$grid."' class='grid-image avia-hover-fx'>".$custom_overlay.get_the_post_thumbnail( $the_id, $image_size )."</".$link_markup[1].">";
Replace it with:
$output .= "<".$link_markup[0]." target='_blank' data-rel='grid-".avia_post_grid::$grid."' class='grid-image avia-hover-fx'>".$custom_overlay.get_the_post_thumbnail( $the_id, $image_size )."</".$link_markup[1].">";
Cheers!
IsmaelJanuary 1, 2015 at 11:49 pm #373961Ismael,
Super confused are where to find this code, where is config-templatebuilder > avia-shortcodes > portfolio.php?
I went here and couldn’t find it /wp-admin/theme-editor.php?file=template-builder.php&theme=enfold
Should I be looking somewhere else?1). Would be great if under the link settings for a Portfolio item there was a drop down to define where to open the link (self, light box, new tab) after setting a manual link.
2). Is there any way to create CryOut Columns? A number of free themes like Tempera have this option and like looks super slick and is easy to use, plus you can define link location super easy or have the most recent post automatically show up in a spot. Here is an example if you scroll down the sample page I created here http://bowlerbash.com/
January 2, 2015 at 12:21 am #373974I have found that the Partner/Logo Element works to make a pseudo portfolio where you can set a row with how many columns you like and set the link for lightbox, self, new window, or none.
Biggest issue with this is that once you have more elements than columns it makes you scroll to view so if you have 10 items and 5 columns you re better off creating 2 separate Partner/Logo Elements stacked on one another.
Hopefully soon the Portfolio will have these common functions or there will be a CryOut Column Widget.
JonJanuary 2, 2015 at 8:21 pm #374198Hi!
Please feel free to request such feature here – https://kriesi.at/support/enfold-feature-requests/
You should go to the file Ismael mentioned above via FTP. You should go to wp-content/themes/enfold/config-templatebuilder/avia-shortcodes file and open portfolio.php file to make the changesCheers!
YigitJanuary 2, 2015 at 9:18 pm #374226I also noticed another thing goofy with the Masonry Grid.
If you have a grid with say 20 items and you set it to display 10 at a time it correctly puts the extra ones as under a page 2 tab, but it doesn’t treat it like a tab it reloads the entire page.
This hiccup makes it hard to put gallery inline with content unless you display all the images at once.
Thanks
Jon.January 3, 2015 at 3:34 am #374395Hey!
Yes, it is the default behavior of the masonry element. You can add an ajax script to prevent page reload but this will require major modification on the theme. Please hire a freelance developer or visit Envato Studio or Werkpress for further modifications. If you don’t mind, we kindly ask you to open your own thread. Thank you.
Regards,
IsmaelFebruary 3, 2015 at 4:39 pm #390187Hey!
Ismael, I want to share here that I’m getting no problem after I applied the changes you tell to do in first answer! That works perfect, thanks! Just one thing I want to warn here is the number of the lines that you gave is incorrect, but searching with ctrl+F it can be found.
Thx!!
ProCDI
- This reply was modified 9 years, 10 months ago by procdi.
February 4, 2015 at 10:39 am #390629December 18, 2016 at 2:09 pm #725833This answer also helped me out! Actually, in current Enfold version, the portfolio.php is some different with all past ones, the code lines should be line 492 and line 506. Thank you!
December 18, 2016 at 5:19 pm #725855Hi!
Happy you can get it short out.
Remember to always use a child theme, so there is no lost of your modifications, after any update.Thanks a lot
Best regards,
Basilis -
AuthorPosts
- The topic ‘Need New Tab External Link in Portfolio Grid’ is closed to new replies.