Skip Navigation

[Resolved] Can I have a custom label on a custom search field when displaying a View Search?

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to use a custom label when displaying a custom search filter.

Solution: You can hide the default label using the custom search field settings and provide your own custom label using other blocks in the search filters area.

This support ticket is created 4 years 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by blazM-4 4 years ago.

Assisted by: Christian Cox.

Author
Posts
#1931331

Tell us what you are trying to do?
On a page I want to have a view with some search fields at the top. These fields have an automatic label, the field's name, I guess. Can I change that to something more appropriate for the purpose?

Is there any documentation that you are following?
no
Is there a similar example that we can see?

What is the link to your site?
rebild.life/butler

#1931969
Screen Shot 2021-02-03 at 11.57.20 AM.png
Screen Shot 2021-02-03 at 12.01.55 PM.png

Hi, you are correct that the label is based on the filter being displayed. If it's a custom field filter, that is usually the field name. If it's a taxonomy filter, it's usually the taxonomy name, and so on. You can change the field name in Toolset > Custom Fields when you edit the field group, but that will also change the name of the field in wp-admin when editing posts. If you'd prefer to use a custom label in the search form but keep the field name as it is in wp-admin, there's nothing exactly like that built into the Blocks system. Instead, you can select the custom search filter and use the toggle switch to turn off the label display (see the screenshot Screen Shot 2021-02-03 at 11.57.20 AM.png), then add your own custom text in the block editor using a paragraph block or something similar. Click the "Add Other Blocks" button in the search area (see the screenshot Screen Shot 2021-02-03 at 12.01.55 PM.png) to insert a paragraph block or some other block to display a custom text label.

Let me know if you have questions about implementing this in the block editor, and I can give more guidance.

#1935037

My issue is resolved now. Thank you!