Skip Navigation

[Resolved] Query Views

This support ticket is created 4 years, 4 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: Asia/Karachi (GMT+05:00)

This topic contains 6 replies, has 2 voices.

Last updated by suzyo 4 years, 4 months ago.

Assisted by: Waqar.

Author
Posts
#1400337

Is it possible to filter views query by both taxonomy AND custom field?

#1400435

Got it. Slug of custom field in orderby in shortcode.

#1400529

I spoke too soon. I have a View that I'm using in multiple posts types. This View outputs a post type by one taxonomy.

I want to add a filter using a custom field. Is there a way to do this?

#1400561

Hi, Waqar. This seems to be working, but I can't be sure, lol. Does this look right?

'[wpv-view name="guide-eats-by-town" limit="6" orderby="field-wpcf-editor-s-choice" ]'

Also, can you give me some guidance to achieve this? I can't get it to work.

'[wpv-view name="Filter by post id" ids="302,12,309"]'

#1400613

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting us and I'd be happy to assist.

Glad you figured out how to override the default post order through the "orderby" attribute in the "wpv-view" shortcode.

That shortcode's usage that you shared is correct and you can read more about this shortcode's available attributes at:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-view

As for the second part of your question, this is how the shortcode can be used to call, only the posts with specific IDs:


[wpv-view name="guide-eats-by-town" ids="302,12,309"]

Please make sure that in your view's "Query Filter" section, a post ID filter exists, as shown in this screenshot:
hidden link

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#1402385

Thank you very much, Waqar!

#1402387

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.