Is it possible to filter views query by both taxonomy AND custom field?
Got it. Slug of custom field in orderby in shortcode.
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?
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"]'
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
Thank you very much, Waqar!
My issue is resolved now. Thank you!