Skip Navigation

[Closed] I would like a help on Views.

This support ticket is created 3 years, 10 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
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 2 replies, has 2 voices.

Last updated by Jamal 3 years, 10 months ago.

Assisted by: Jamal.

Author
Posts
#1647907

Hello, how are you?

I would like a help on Views.

I created several types of CPTs on my website, and created the view with several taxonomy filters and a search field for words.

The taxonomy filters, are working perfectly, however, the word field, it is bringing content from other types of CPTs, is mixing things up, even though I am marking that the view is for a single type of CPT.

Just so you understand better:

I created the following CPTs: "Public Posts" and "Restricted Posts", each type with some sample posts for the test.

I created the view only for "Public Posts", with their due taxonomies.

The taxonomy filters are all ok.

The search field for keywords is bringing results from "Public Posts" and "Restricted Post" and this is wrong, you only have to bring "Public Posts".

Follow the link for you to see and test:
hidden link
(type "post" in the search field to see the error)

For this field I am using this element:
[wpv-filter-search-box output = "bootstrap" placeholder = "Write what you are looking for here ..."]

How to restrict to bring only the correct CPT?

Another thing I noticed, this field only does the search in the titles and in the content, how do I search in all the fields of the posts?

I already created a username and password for you, if you need it I send it.

I'm waiting.

PS: Sorry for the English, it's Google Translate.

#1647973

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello and thank you for contacting the Toolset support.

From what I can gather so far, I believe that the view is configured to display both the "Public Posts" and "Restricted Posts". In that case, it will always return matched posts from both custom post types.
Otherwise, there is some corruption on the view and I'll need access to your admin area to check it closely.

For your second question about what the search field is trying to match(Title, content, or custom fields), Views can perform search on either "Title" or "Title and content". To be able to search also on custom fields, you will need a 3rd party plugin "Relevanssi".
https://wordpress.org/plugins/relevanssi/
Check this article on how to configure that https://toolset.com/documentation/user-guides/views/searching-texts-custom-fields-views-relevanssi/

Please, note, that once you add a search filter that includes custom fields, the entire search operation is performed by the Relevanssi plugin, which means that Relevanssi is also responsible for providing the results order. This is why the Views sorting order options are not used. This includes ordering results by distance in a search for posts that include a Toolset Maps address field, where Relevanssi determines the ordering.

I hope this helps. Let me know your feedback.

#1648779

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Thank you for the login details. I confirm that the view is correctly configured.

After enabling Toolset debug mode in Toolset->Settings->Frontend Content->Debug mode. It seems that something else on your website is altering the database query to search within multiple custom post types. Check this screenshot hidden link

It could be custom code in your theme or a feature from the theme or another plugin, to verify which one, please check if this issue appears when:
- Only Toolset plugins are activated. It will tell us if there is an interaction issue with another plugin.
- The theme is set to a WordPress default like Twenty Fourteen. It will tell us if there is an interaction issue with your theme.
If the problem disappears, start activating one at the time to track where the incompatibility is produced.

If this does not help narrow the cause of this issue, I'll need to take a copy of your website for further debugging on my local environment, let me know if I can take a Duplicator copy.

The topic ‘[Closed] I would like a help on Views.’ is closed to new replies.