Hello Support Team,
I have one custom post type Jobs in that i have 2 post reference field "Related Location" and "Related Contact person" Field and i want to add both field value in post overview with column sortable.
Can you please help me with this.
Thanks
Hi,
Thank you for contacting us and I'd be happy to assist.
To suggest the best way to achieve this, I'll need to see how this "Jobs" post type template and the post reference fields are set up.
Can you please share temporary admin login details, in reply to this message?
Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.
regards,
Waqar
Thank you for sharing the access details.
I understand you're referring to adding sortable columns in the post-management screen in the admin area and not the front end.
Toolset plugins don't include any built-in feature for this customization, so this will require either some third-party admin screen management plugin.
I see you've already added some custom code in the theme's "functions.php" file to add these columns, but, to make them sortable, you'll need to update your custom code as per this guide:
https://code.tutsplus.com/articles/quick-tip-make-your-custom-column-sortable--wp-25095
Note: Since post reference fields store the related post in the structure of post-relationship and not as custom fields, you may have to replace those post reference fields, with the regular select type fields, and then use the "wpt_field_options" filter, to programmatically generate those field options from the relevant post types:
https://toolset.com/documentation/programmer-reference/types-api-filters/#wpt_field_options
You'll find an example usage code in this support thread:
https://toolset.com/forums/topic/programmatically-add-options-to-select-custom-field-with-a-filter/#post-2320285
My issue is resolved now. Thank you!