Forums › Forums › Search & Filter Pro › Filter by Post Meta, Custom Field equal to page title
Tagged: page title, post meta filter
- This topic has 1 reply, 2 voices, and was last updated 4 years, 1 month ago by Trevor.
-
Anonymous(Private) October 27, 2020 at 9:14 pm #264330
I have a custom field for posts that allows authors to establish a “linked supplier” (this is Pods custom field extending the Posts content type). I want to be able to filter results setting this custom field equal to the page title.
I’ve setup the filter (to be output via an elementor widget), with the following:
_pods_linked_supplier char = wp_title
Nothing is displayed. Is my syntax for the page title wrong or is this not allowed?
Trevor(Private) October 28, 2020 at 10:11 am #264370I am unable to advise you on the usage of PODS, sorry. Are you trying to make a field in the form that has (maybe a select dropdown) a list of the post titles (one hopes the list will remain small, otherwise the user experience would be very poor?
The problem is that post titles are not stored by WordPress in a way that we can make them in to a list to populate a form field (this I guess you already figured).
If you want them to be available this way, you must add a custom field to the posts and duplicate the name in to that new field. For the existing posts, you would have to manually edit each expert.
You could automate the making of the duplicate field for new posts, and even for any posts that you edit and simply save. This is an example of an automated field value fulfilment when the save (update) button is pressed in the edit post page:
https://support.searchandfilter.com/forums/topic/datefilter/page/3/#post-238869
And this is a Google search for some ideas on how to copy the post title:
-
AuthorPosts