Skip Navigation

[Resolved] I need to display the featured businesses first or at the top of the list

This support ticket is created 6 years, 1 month 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)

This topic contains 7 replies, has 2 voices.

Last updated by Christian Cox 6 years, 1 month ago.

Assisted by: Christian Cox.

Author
Posts
#1135121

Tell us what you are trying to do?
-I'm trying to list a set of businesses on top as featured so they show up first rather than the ascending and descending option, where do i set the options to list a bunch of businesses first?
Is there any documentation that you are following?
-none
Is there a similar example that we can see?

What is the link to your site?
hidden link

#1135739

Hi, you can handle this in different ways. One way is to add a custom radio input field in this post type that stores either a 1 ("Not Featured") or a 2 ("Featured"). Make the default 1 ("Not Featured"), and save all your custom posts with this new field set as desired. Then in the primary sort order of a View of this custom post type, you can choose to sort by this custom field value, descending. 2's are listed first and 1's are listed after those. You can also choose a secondary sort order like post date or post title, which is applied when posts have the same featured or unfeatured value.

Please note that when WordPress sorts posts by a custom field value, posts that have no value for that custom field will not be included in the results. That's why we recommend this A or B approach instead of a single checkbox for "Featured". Let me know if you have additional questions about ordering a View by custom field value.

#1135772

I added the Featured and not Featured in the Custom Fields Group with a radio input field, chose the featured on a few of business listing and tried to add the view in one a page to test, but it is not showing the businesses that I have set to featured, I tried order by asc and dsc. Did I miss a step to do?

#1135988

Here is the page That I tested with the order arrangement:
hidden link

Here are the businesses I added the featured, but are not being posted on top
Wahoo’s Fish Tacos
Carlitos’s Diner

Btw I changed theme to OceanWP with Elementor editor from DIVI cause I have issues with loading speed and Desktop vs Mobile version issues.

#1136094

I added the Featured and not Featured in the Custom Fields Group with a radio input field, chose the featured on a few of business listing and tried to add the view in one a page to test, but it is not showing the businesses that I have set to featured, I tried order by asc and dsc. Did I miss a step to do?
I'll be glad to take a closer look if you provide login credentials in the private reply fields here. Please let me know which View I should check.

#1136166

Hi, please check now. I removed the "override" settings from the shortcode in your Elementor template, and added the correct settings in the View editor.

#1136336

That was not what I was doing..I still need the other businesses listed..right now its just the featured that is showing What I needed was to show the the featured will be on top and list other businesses under the featured businesses.

#1136839

The View is configured correctly, but the "not featured" posts have not yet been saved with the correct custom field value. The problem right now is that no custom field value is saved for the "not featured" posts. I just edited the "Love at First Bite" post and clicked "Update" without making any changes. This saved the default "Not featured" value for the custom field, and now this post appears in the list. So the solution is to click "Update" in each "not featured" Directory Listing post, to store the correct custom field value.