Tagged: caption, height, image title, masonry
-
AuthorPosts
-
October 12, 2014 at 1:19 pm #334487October 13, 2014 at 8:04 am #334683
Hi stephenr_nl!
Thank you for using Enfold.
The title popup is default browser feature. You can replace the image title manually on Media > Library panel. Or you can edit config-templatebuilder > avia-shortcodes > masonry_entries.php. Find this code on line 578:
$items .= "<{$html_tags[0]} class='{$class_string}' {$linktitle} {$markup}>";
Replace it with:
$items .= "<{$html_tags[0]} class='{$class_string}' title='{$content}' {$markup}>";
Make sure that you keep a change log of this modification or use a child theme.
Cheers!
IsmaelOctober 13, 2014 at 11:17 am #334788Hi Ismael,
Thanks you for your response. I am using a child them, but I don’t know what to add to my functions.php file to just replace this parameter value. I was thinking something like the code below (which does not work). Can you assist?
/*Replace the image title on the full Masonry*/
function masonry_image_title() {
if($post_type == ‘attachment’ && strpos($html_tags[0], ‘a href=’) !== false)
{
$linktitle = ‘title=”‘.esc_attr($description).'”‘;
}
else if(strpos($html_tags[0], ‘a href=’) !== false)
{
$linktitle = ‘title=”‘.esc_attr(‘test’).'”‘;
}return $linktitle;
}October 14, 2014 at 6:22 am #335371Hey!
Please add this on the child theme’s functions.php:
add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1); function avia_include_shortcode_template($paths) { $template_url = get_stylesheet_directory(); array_unshift($paths, $template_url.'/shortcodes/'); return $paths; }
Create a folder called shortcodes then add the masonry_entries.php inside.
Regards,
IsmaelOctober 14, 2014 at 10:13 pm #335778Thank you Ismael, this worked perfectly. Eventually I want a more enhanced method to display the excerpt and I added a feature request for that: “Option for Masonry to always show title and on mouse over add the excerpt”.
You guys are giving excellent support and I recommend my friends to use this same theme because of that and of course because the theme is beautiful.
So thanks again.Stephen
-
AuthorPosts
- The topic ‘Full width Masonry, change the image title and caption height’ is closed to new replies.