[Resolved] Featured Ad placed at the top of the lists
This support ticket is created 6 years, 6 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.
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.
Tell us what you are trying to do?
I am using the Classified reference site, and I want to have the featured ads shown at the top of listing_cat's.
How is that possible?
Is there any documentation that you are following?
Is there a similar example that we can see? hidden link
Look for the Three-Dimensional Shape Red 3D Sedan
In order to sort or filter by a custom field, all posts in the results must have some value stored for that custom field. In the case of "Featured Ad", the posts without the checkbox checked do not hold any value for the custom field, so they will not be included in the results. This is a quirk of how WordPress works, unfortunately. I can think of one way to solve this: change the "Featured Ad" custom field to be a radio control instead of a checkbox. The radio should have two options - "Featured" = 1, "Not featured" = 0. One of these selections is required. You may have to resave existing listing posts to save the correct value for the custom field, and you may need to update CRED forms that create these listing posts. Then in the View editor, order by the Featured Ad custom field, with secondary order by post date.
If you delete the checkbox field, then create a new radio field with the same slug, this should be okay. If you use a different slug, none of the checkboxes that are already checked will be transferred into the new radio field. You would have to set the radio control manually in all those posts once again.