Site logo

Archived topic

masonry cloud tag

15 replies · Started by Hans on February 25, 2017

Viewing posts 1–15 of 16

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.

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?

Awesome - it works for the cloud.

Edge Browser only: May you have a look on this page in Edge browser (page 2). The masonry is broken. Other examples are these links: exp1, exp2 - also page 2.

Opera, Firefox, Chrome work with these searches. I don't know if it works with Safari.

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!

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

This archived topic is closed to new replies.