Fullwidth Masonry Gallery … open custom link in a new window/tab possible ?
an option to allow an opening in a new window/tab would be great.
Hey pixelmixture!
I’m not sure if it is possible but you can choose to open the link on a new tab. Edit config-templatebuilder > avia-shortcodes > masonry_entries.php, find this code:
//set the html tags. depending on the link settings use either an a tag or a div tag
if(!empty($this->atts['container_links']) || !empty($custom_url))
{
$this->loop[$key]['html_tags'] = array('a href="'.$this->loop[$key]['url'].'"','a'); //opening and closing tag for the masonry container
}
else
{
$this->loop[$key]['html_tags'] = array('div','div');
}
Replace it with:
//set the html tags. depending on the link settings use either an a tag or a div tag
if(!empty($this->atts['container_links']) || !empty($custom_url))
{
$this->loop[$key]['html_tags'] = array('a target="_blank" href="'.$this->loop[$key]['url'].'"','a'); //opening and closing tag for the masonry container
}
else
{
$this->loop[$key]['html_tags'] = array('div','div');
}
Remove browser cache then reload the page.
Cheers!
Ismael