Skip Navigation

[Resolved] Custom Filter by current user

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 6 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 10:00 - - - - -
- - - - - - -

Supporter timezone: Africa/Cairo (GMT+02:00)

This topic contains 1 reply, has 2 voices.

Last updated by Mohammed 6 years, 9 months ago.

Assisted by: Mohammed.

Author
Posts
#630281

Hi,

I have a functionality installed which adds to a CPT the array of user_IDs who have favourited a post in the field "favourite".
Now I want to show a view only showing the favourites of the current user.
Can I do this with the normal front-end?

BR Markus

#630558

Hi Markus,

Unfortunately, this is not applicable natively by Toolset but this can be done with some little code.

Checkout our Views filters, there is a filter to edit the query used in user Views (wpv_filter_user_query)
https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_user_query

Using this query, you can limit the query to return only the currently logged in user.

This is the best way you cna achieve your request using Toolset.

I hope this helps you.

Thanks.

The forum ‘Types Community Support’ is closed to new topics and replies.