Tell us what you are trying to do?
I have everything almost working fine, only I can't search by user yet.
When I place a Custom Search Filter I cannot select USER.
See screenshot.
What am I doing wrong?
Hello. Thank you for contacting the Toolset support.
Because you can not build a custom search form user. You can add frontend filter to post type view or archive for custom fields/taxonomies but not for the user.
Do you mean you want to add frontend filter so that user can filter the posts based on the selected user? If so you can not add frontend filter for user but if you want to just pre-filter the posts based on the post author then its possible.
Thanks for your quick response.
I have already built a view where the USER can see and edit his own posts. This is visible when this USER is logged in.
I also built a view where all messages from all USERS are visible, these are visible to all visitors to the site.
Is it possible that a visitor to the site can search for messages posted by 1 specific USER?
No - its not possible to add a frontend filter by user field or user custom field.
But if you able to store the ID of the user to a custom field then we can make it happen but to ensure the what could be the best possible workaround I will require to review your current setup.
Can you please share on what page you want to add the frontend filter to what view and send me admin access details.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
Is it possible that a visitor to the site can search for messages posted by 1 specific USER?
==>
It is not possible to offer frontend filter for user but what you can do is add a custom field that should hold the value of username and then add this custom field as frontend filter. Will that work for you?
If yes, then you can create a custom field and make sure that when the message/post is created you should save the username as the custom field value and then add this custom field to your view as frontend filter.
I think that works for me.
I assume that with CustomField I have to create a field where the name of the user is automatically included?
So that it can be searched for via the FrontEnd.
You have to add that field to your custom field group that holds other fields and you have to make sure that when you create/submit new entry that field should be automatically loaded with the username of the user.
You can go to: Toolset => Custom Fields and to your desired custom field group add the custom field.
Now, I would like to know from where you are added the new entries. Is it added from frontend or backend?
You can add the field name and slug as per your choice and create that field.
The field value needs to be populated when you save/create new post. That is why I asked you in my previous reply that from where you are creating the posts, from frontend or from backend?
So when user will submit the above form - we will automatically capture the user name and store it to the newly created custom field that will hold the username value. Does that makes sense?
Can you please tell me now if you already created the custom field that will hold the username value?