Skip Navigation

[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.

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)

This topic contains 5 replies, has 3 voices.

Last updated by Shane 6 years, 6 months ago.

Assisted by: Shane.

Author
Posts
#785604

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

What is the link to your site?

#786536

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.

#852858

Hi Christian,

I tried to change the custom field "Featured ad" from Checkbox to Radio, but it isn't allowed.

Should I make a new custom field with radio, and then delete the one with the checkbox, or does that give me trouble?

#857152

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.

#889404

Please keep this topic open, as I haven't been able to fix this yet.

#892957

Shane
Supporter

Languages: English (English )

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

Hi Tommy,

As Christian is currently on vacation I will be handling this ticket.

This ticket will remain open but please update me with any information regarding this.

Thanks,
Shane