Skip Navigation

[Resolved] New feature for users to hiding some listings that are not available

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 5 replies, has 2 voices.

Last updated by Minesh 8 months, 1 week ago.

Assisted by: Minesh.

Author
Posts
#2688344

Hi, since the users will not have access to the back end, is there any way that I can add a feature for users to disable some of their listings or decide which one to show without completely deleting the item?

Is this possible?

#2688360

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

You should add a custom field "Listing Status" that should hold the Boolean value and you can create Edit listing form and allow user to Edit the listing from frontend where user should be able to set the desired status for custom field "Listing Status".

Does that makes sense?

More info:
- https://toolset.com/course-lesson/front-end-forms-for-editing-content/
- https://toolset.com/course-lesson/front-end-forms-for-editing-content/#adding-an-edit-link-to-templates-that-display-single-items

#2688366

I can surely create a listing status as a boolean but how it is going to help me to disable not available properties from the front end?

What I would like to achieve is once the listing's status is changed to unavailable from page editors, website visitors shouldn't be able to see that listing from the front end.

Could you please provide a bit more detailed answer for me? Thank you Minesh!

#2688435

Minesh
Supporter

Languages: English (English )

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

What I would like to achieve is once the listing's status is changed to unavailable from page editors, website visitors shouldn't be able to see that listing from the front end.
===>
Maybe you can change the post status to draft when listing status change to unavailable.

I do not know the site flow - from where the listing status will be changed? Using Toolset form by frontend user or it will be handle by admin from backend?

#2688555

Hi Minesh,

All I need to do is to hide from the listing. I have an idea...

How about if I create a boolean custom field called "Listing status". So, when it is 0, the result is not available and when it is 1, the result is available.

And then, someway, can I put a filter in the back-end of the listing to show only ones with available listing status automatically?

As a result, when it is marked as nonavailable from the user's side, it won't be listed on the page! Could you please at least guide me with all the details for this solution?

#2688572

Minesh
Supporter

Languages: English (English )

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

And then, someway, can I put a filter in the back-end of the listing to show only ones with available listing status automatically?
===>
Do you want to filter the results on custom post type listing page in backend admin? If yes:
- You may try to use the Admin Columns plugin using which you can add custom filters on custom post type listing page on admin.
https://wordpress.org/plugins/codepress-admin-columns/

OR

You can use the hook as suggested with the following link:
- https://wordpress.stackexchange.com/questions/212519/filter-by-custom-field-in-custom-post-type-on-admin-page