Plugin Author
Tako
(@razzu)
Hello,
please update shortcode after making changes then yu will see new updated Shortcode, and use it .
Thanks
Ah ok, I didn’t know there was a shortcode attribute sm_category_name — had to dig through your code, because it wasn’t being set in the shortcode field. There seems to be a bug in your plugin.
In class.siple.masonry.admin.php line 156-162, the sm_category_name attribute only gets set if the $sm_post_type and $sm_as_gallery is set. This means if you have Use as Masonry Layout Gallery disabled, it will never add category the attribute to shortcode in the admin UI. I had to manually add the attribute in my shortcode and it started filtering by the category I specified.
I don’t see any other place in your code where sm_category_name is set.
Original code Line 156-162:
if ($sm_post_type && $sm_as_gallery) {
$shortcode_atts['gallery'] = 'yes';
if ($sm_category !== 'none') {
$shortcode_atts['sm_category_name'] = $sm_category;
}
}Updated code:
if ($sm_as_gallery) {
$shortcode_atts['gallery'] = 'yes';
}
if ($sm_post_type && $sm_category !== 'none') {
$shortcode_atts['sm_category_name'] = $sm_category;
}On an unrelated note, I’m not sure if I’m doing something wrong here, or it’s a conflict with my theme CSS, but It’s only showing 2 columns with a lot of space on the right instead of 3. I assume it’s either some configuration that I missed or some CSS or HTML that’s causing it to push the 3rd column down to the next row. Maybe it’s not wide enough. I’ve been digging through the HTML and CSS for a bit and haven’t found anything yet. Any suggestions?
- This reply was modified 14 hours, 58 minutes ago by acmdesigns.
Plugin Author
Tako
(@razzu)
Thanks buddy, it’s my bad, i have hotfix it.
But about 2 columns, it’s may be because of theme’s css.
Cheers 🙂
