Skip Navigation

[Resolved] Please consider adding Customizer Fields

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.

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by Kirill 2 years, 5 months ago.

Assigned support staff: Beda.

Author
Posts
#630198

I really love the ease of creation and use of custom fields with Toolset. Thanks you all for all your hard work!

Right now we can create two types of fields (please correct me if I'm wrong here): Post Fields (adds fields to a group of posts) and User Fields (adds fields to user profiles). However, during theme, or site, development, there is often a need to create fields that will store options of the whole site, or theme. WordPress, AFAIK, recommends to use Theme Customizer fields for that.

It would be wonderful if Toolset would add a new Customizer Fields type that would allow to add fields to Theme Options. That would create a great opportunity to use Toolset fields for storing settings site-wide. Of course, this can be done manually right now (as everything that Toolset does), but it is tedious and can be easily automated.

I hope it will not be much work for Toolset developers to implement. The mechanics for storing and displaying fields is already there. The only thing that needs to be added is the way to register fields in Theme Customizer and I believe it should not be too hard.

Please let me know what do you think.

#630227

I think you misunderstand "Custom Fields" and "Options".

Custom fields are values, that you store in each post, those are not options.
It's like a post title or post body.

Options are things that then define "how" a site works.
This is not a custom field of a post and stored in a different database table.

If you need to display things everywhere, globally, on the site, then the Theme is the right place to do it, or a Layout, or Content Template that are applied sitewide.

Do I misunderstand the request?
Maybe you can show an example 🙂

#630240

Thank you for your response, Bada!

When I was saying "field" I meant some generic "data cell" element where some piece of information can be stored, whether it is post meta, user meta, or theme mod. Types calls "post meta" "Post Fields", "user meta" "User Fields", so I was trying to extrapolate the same terminology to "theme mods", but maybe it was misleading.

Let me explain what I would like to have.

If you want to attach some piece of information to a post, you can do it with post fields (or post meta in WP terminology). Then each post from a group would have a filed shown in a post editor where you can store some data. That data is unique to the post. It works similar for user fields.

Now let's say I want to store some information that is related to the site as a whole, not to any particular post. Let's say it's a color of a banner that is shown on every page of the site. And I would like to use this color in Layouts and Content Templates the same way I use Post Fields.

WP recommends to use "theme mods" for storing such information. Unfortunately, there is no way, I believe, to create a theme mod within a Toolset using its excellent graphical UI. There is also no way to insert a theme mod value into a template, except for creating a custom shortcode for that.

So I was suggesting to Toolset to create a new type of "field" (as such items are called "fields" by Toolset), along with existing Post Fields, Meta Fields, and User Fields. When a new element of that field is defined (via "Add new field"), it will appear in Theme Customizer. I would also like fields of this type to be available in Custom Template editor the same way Post Fields are so I would be able to insert their value with one click. Internally it would use "set_theme_mode" and "get_theme_mode" to store and retrieve data, but that would be hidden behind Toolset's UI.

Did I describe it clear enough? Ready to explain it more if needed.

Thanks!

#630246

I think I understand but still think that this is not within the scope of Toolset.

It's not a thing related to what Toolset does.

But, I am not so sure about that and will consult the DEV in regard.

In any case, you can consider this feature filed and discussed.
If you wish you can close the ticket here as any eventual implementation of this would be big enough to announce publicly.

In a few weeks you will also be able to see this exact request publicly for other users to be upvoted 😉

Thank you!

#630247

Change state of ticket.

#630255

Thank you, Beda!

Toolset being very helpful in adding new features or automating routine operations of site development. Creating and using theme mods is a thing I have to do on every site. It would be really great to see it automated too.

Toolset does a great job integrating with plugins such as WPML or WooCommerce, or third-party APIs (Google Maps). So I believe adding an integration with Theme Customizer would fall into this too, but I might be wrong.

Anyway, thank for for the great tool which Toolset is and for your excellent support!