- This topic has 15 replies, 2 voices, and was last updated 6 years, 10 months ago by Tom.
-
AuthorPosts
-
February 25, 2017 at 1:05 pm #283961Hans
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
February 25, 2017 at 9:37 pm #284064TomLead DeveloperLead DeveloperHi Hans,
Can you link me to a page that’s working and a page that isn’t working?
February 26, 2017 at 12:49 am #284098HansHi 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.
February 26, 2017 at 9:12 am #284205TomLead DeveloperLead DeveloperHmm, looks like there’s broken HTML on the page.
Can you try #1 on this page?: https://docs.generatepress.com/article/debugging-tips/
February 26, 2017 at 11:36 am #284268HansHi 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
postI 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.
February 26, 2017 at 11:06 pm #284390TomLead DeveloperLead DeveloperYou 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; }
February 27, 2017 at 11:08 am #284667HansHi 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.
February 27, 2017 at 8:01 pm #284845TomLead DeveloperLead DeveloperThat’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?
February 27, 2017 at 9:28 pm #284867HansFebruary 27, 2017 at 10:55 pm #284880TomLead DeveloperLead DeveloperWhat 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.
February 28, 2017 at 12:40 am #284894HansThis sounds reasonable!
Thanks a lot!
Here I attach a screenshot of the broken masonry!
February 28, 2017 at 3:44 pm #285356TomLead DeveloperLead DeveloperDoes that still happen if you deactivate your social sharing plugin?
March 1, 2017 at 12:55 am #285456HansHi Tom,
when I deactivate the social sharing plugin everything is okay. So your assumption is correct!
March 1, 2017 at 10:41 am #285735TomLead DeveloperLead DeveloperHmm, 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.
June 12, 2017 at 7:29 am #332409HansHi Tom,
it took some time. Now the developers of the plugin fixed the problem and everything seems to be okay.
Hans
-
AuthorPosts
- You must be logged in to reply to this topic.