Skip Navigation

[Resolved] VIEW with multiple custom types displays only two

This support ticket is created 2 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by igorL-3 2 years, 7 months ago.

Assisted by: Christian Cox.

Author
Posts
#2156347

Tell us what you are trying to do?

I have a VIEW containing 14 Custom Post Types and a native Post Type. However, when displaying the VIEW only Posts and one of the Custom Types is shown. If I deselect Posts and that particular Custom Type then the other Custom Types are shown. The odd thing is that I need to deselect both Posts and that one specific Custom Post Types for the other Custom Posts to be displayed.

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?

#2156393

Hi, I'll be happy to help. First, can you take some screenshots of the View configurations from wp-admin so I can see the Content Selection, limits, pagination and any Query Filters applied to the View? Please include those screenshots with your next reply.

It would also be helpful for me to see the Views debug information associated with this View. To turn on Views debug mode, please go to Toolset > Settings > Front-end Content, and turn on Views debug mode. Reload the front-end page containing the View and a popup should appear. You may need to temporarily disable your popup blocker to see this popup appear. Open up all the sections of the debug popup and copy its contents, then paste in your next reply for me to review.

#2156433

Hello Christian,

I think it's better I gave you acess to the site as the DEBUG window generated was quite long to go through over 100 Show buttons.
I made an aadmin account for you please send me a private message. The debug is all set up.

#2156439

Sure, private fields are active here. Please let me know where to find this View on the front-end of your site.

#2157657
Screen Shot 2021-09-01 at 4.39.33 PM.png

Okay based on the debug information I can see, it looks like there might be some kind of interference coming from Polylang. The post types applied in the View editor are all also applied in the main WP_Query. There seems to be a "language" taxonomy term filter applied to this View's query somehow. If you open the debug information popup, you can see information about this in the MySQL section or in the Query Results section. In Query Results, for example:

  [tax_query] => Array
                (
                    [0] => Array
                        (
                            [taxonomy] => language
                            [field] => term_taxonomy_id
                            [terms] => 75
                            [operator] => IN
                        )

                )

That's a taxonomy filter based on a taxonomy with the slug 'language' (not created in Toolset, I checked) and a term with the ID 75.
I did a quick check of your custom code snippets in Toolset > Settings > Custom code, and quickly scanned your functions.php file, but I don't see anything obvious that is adding this filter programmatically. It's definitely not added as a Query Filter in the View editor screen. My guess is that it's coming from the Polylang plugin.
I checked here:
hidden link

The Polylang language term with ID 75 is "English". So that makes some sense I guess, though since none of the other CPTs are translated other than Borzoi, I guess that is the reason they don't show up in the results (unless Posts and Borzoi, the translated post types, are removed from the results).

To confirm that the Polylang plugin is responsible, I could temporarily disable it and check the results of the View. If I'm correct, all the post results will begin to appear together. Let me know if it's okay to run that test, and I'll let you know what I find out.

#2158145

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.