Skip Navigation

[Resolved] Favorites post in View

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the customer was using the favourite posts plugin but wanted to filter his view for these favourite posts.

https://wordpress.org/plugins/favorites/

Solution:

This plugin creates a custom field on the posts to hold a counter for the amount of times favourited. This field is called "simplefavorites_count"

Now all that is needed is to add a query filter to your view for this field that will allow you to list out the posts if the count is greater than a certain number.

0% of people find this useful.

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

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 15 replies, has 2 voices.

Last updated by christopheV-2 6 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#603404
#603472

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Christophe,

Thank you for contacting our support forum.

I'm not 100% sure of what you are trying to achieve so in order to assist better could you explain in a bit more detail for me so I can see whether this is possible or not.

Thanks,
Shane

#603479

Hello,

My install it's ok : https://wordpress.org/plugins/wp-favorite-posts/

In my list post (Tournament Handball) I add a button "add favorite" and "remove favorite", it's OK.
Only admin and subscriber see the option (its 'ok)
Tournament it's my taxonomy, Handball it's my Term.

I would like create a view Tournament with a favorites posts.
I can use a new function ? or query in my view configuration ?

Thanks

#603525

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Christophe,

So you want to create a lists where users can view their own favourited posts ?

Or is it that you want to list out the tournaments that have favourite posts

Please let me know.
Thanks,
Shane

#603570

List out the tournaments that have favourite posts 😉

Thanks

#603804

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Christophe,

Would you mind providing me with admin access to the website so that I can have a look ?

This might be possible if the plugin stores the favourite information as a custom field.

The private fields have been enabled for your next response.

Thanks,
Shane

#604542

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Christophe,

Thank you for the credentials.

Could you share a link with me where I can see the favourites button active?

Thanks,
Shane

#604547

Hello Shane,

This : hidden link

Thanks

#604741

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Christophe,

Would you mind contacting the support persons for the favourite plugins and to ask them if the favourite information is stored in a custom field ?

The value must be stored in a custom field in order for us to filter it.

Please let me know.
Thanks,
Shane

#604974

ok I sent an email to support.

But I found this field in view : simplefavorites_count

And this code hidden link

Thanks

#605240

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Christophe,

Yes I know the field exist but I'm not seeing it on any of the posts from the tournaments CPT. It has to be stored on the post itself in order for us to filter it.
So lets see what there support team says.

Thanks,
Shane

#612175

Hello

I have no answer from their support.
I found this information : hidden link
and hidden link

But not more information

Thanks

#612246

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Christophe,

It seems that you'll be needing this plugin here in order for the code you sent to be used.
https://wordpress.org/plugins/favorites/

If this code does in fact work and there is a custom field called simplefavorites_count then we can use a view to display this.

Please try this and let me know.
Thanks,
Shane

#612328

Hello Shane,

I installed this plugin. I have the field simplefavorites_count
In the filters of my view what to put with this field? constant ? url parameter ?

Thanks

#613039

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Christophe,

Great so since we now have the field we want to list the favourites is the amount of time it was favourited is greater than 0. So you would set the filter to Greater than and for the constant you will set it to 0

Please let me know if this helps.
Thanks,
Shane