Skip Navigation

[Resolved] How to display first based on relationship

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

Problem: I would like to sort the results of a View based on the owner's membership level.

Solution: Use a custom field on the post to store a value that represents the owner's membership level. Sort the View by this custom field.

This support ticket is created 6 years, 5 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Author
Posts
#948432

Tell us what you are trying to do?
I'm trying to setup a touristinformation site with some hotspots which can be queried and mapped in Google Maps.
The idea is to sell partnerships to location owners like restaurants. If they choose for example a Gold partnership they will be shown first on an overviewpage. But how would I setup types and views so that it displays a gold membership partner location if there is a gold partnership location?

Is there any documentation that you are following?
No, but if you could give me some links?

Is there a similar example that we can see?
Not yet.

What is the link to your site?
Not yet.

#948512

You could handle this in different ways. One way is to create a custom "select" field that allows you to choose a level for each post. The default option can be the basic level (value = 1), and another option for the premium level (value = 2). When a partner pays for a premium listing or downgrades to a basic listing, you can modify their post and set the custom field value as needed. Then in a View of these posts, you can use the OrderBy option to sort by this custom field.