Archived topic
masonry cloud tag
15 replies · Started by Hans on February 25, 2017
Hi Tom,
I have two custom post types. When I use search the result shows up perfectly including the custom post types. When I use the tag cloud as starting point I do not get the masonry view for custom post types. I tried your advice in the documentation but did not find the right way. The view shows all results but the custom posts are not in masonry. How can I get the correct view?
Hans
Hi Hans,
Can you link me to a page that's working and a page that isn't working?
Hi Tom,
here is the link not working. It now includes custom post types. The sidebar is under the posts.
If you enter pferdesegnung in the search bar the result is okay in most browsers. In Edge the masonry is broken on page 2.
Hmm, looks like there's broken HTML on the page.
Can you try #1 on this page?: https://docs.generatepress.com/article/debugging-tips/
Hi Tom,
#1 did not show other results. But I should be more precise. The posts have different types in the following order:
tribe-events
post
galerie
post
post
galerie
post
post
I know that masonry supports only posts. So I tried your advice in the documentation but did not succeed in finding the right filter. Could you give me a hint how to build the filter?
For the time being I want to concentrate on this problem. The search problem in edge is not so urgent.
You haven't had any luck with this?
Something like:
add_filter( 'generate_blog_masonry','tu_portfolio_masonry' );
function tu_portfolio_masonry( $masonry )
{
if ( is_post_type_archive( 'tribe-events' ) || is_post_type_archive( 'galerie' ) ) :
return 'true';
endif;
return $masonry;
}
Hi Tom,
it is the same result - no change as you can see here.
It is strange - but I cannot fix the problem. The problem with Edge is not that urgent.
Please advice what I can do.
That's a tag page, so your condition would be: is_tag( 'pferdesegnung' )
Or if you want to target all tags: is_tag()
Does that not work?
What about it is broken? Didn't notice anything on Edge.
One thing that can happen is social sharing buttons like that can be added using javascript. If that's the case, the masonry height will be off as the icons come in too late and add to the height of the element after masonry has already set the height.
This sounds reasonable!
Thanks a lot!
Here I attach a screenshot of the broken masonry!

Does that still happen if you deactivate your social sharing plugin?
Hi Tom,
when I deactivate the social sharing plugin everything is okay. So your assumption is correct!
Hmm, so the only solution would be to ask the plugin devs if there's a JS callback we can use to recalculate jQuery Masonry once the buttons are loaded.
Hi Tom,
it took some time. Now the developers of the plugin fixed the problem and everything seems to be okay.
Hans