Skip Navigation

[Resolved] Show first post that have special field checked

This support ticket is created 5 years, 10 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 7 replies, has 2 voices.

Last updated by nikolaS-3 5 years, 10 months ago.

Assisted by: Minesh.

Author
Posts
#1229959

Tell us what you are trying to do?
I'm building agent - property site. I can do everything from filtering to sorting, but my client is also look for a way to showcase special properties first on listing page (than the rest) that have custom field check.

Let's say I have 3 different property types: Villa, Hostel, Hotel. One of each property types have properties that have pool/jacuzzi included.

Is there a way to showcase them first in list? (Only by that special filed)

Thanks

#1229972

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - what if you edit your view and navigate to ordering section and set your view to orderby that special custom field that holds the value.

#1229981

I'll try that. Thank you!

#1229986

Hi,

I tried your suggestion, it works, but it only displays properties with that fields. Other properties are hidden.

This is the link to page: hidden link

Do you have any other suggestion?

Thanks

#1230013

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - the special field that holds the value is checkbox field or any other field type?

Can you please share screenshot how you setup that field at: Toolset => Custom Fields?

#1230048
Screenshot 2019-04-12 at 16.25.30.png
Screenshot 2019-04-12 at 16.25.21.png

It's checkbox and holds a value of 0-1. I'm sending images in attachment.

#1230060

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - you need to select save option "save 0 to database" so whenever no selection made it will save the 0 to database and 1 when it's selected.

Currently, it is displaying only posts that have the selection and its expected because there is no value saved when checkbox is NOT selected.

If you already added entries you need to add 0 with each of your post and add the entry to post meta table where key will be "wpcf-pool-jacuzzi" and meta value will be 0.

#1230094

My issue is resolved now. Thank you!