Skip Navigation

[Résolu] Query Views

This support ticket is created Il y a 4 années et 4 mois. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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)

Marqué : ,

This topic contains 6 réponses, has 2 voix.

Last updated by suzyo Il y a 4 années et 4 mois.

Assisted by: Waqar.

Auteur
Publications
#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: Anglais (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.