Skip Navigation

[Resolved] Field value all pages

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

Problem:

I want to store a few global text values (language, resort name, ID code) and retrieve them site-wide in different parts of the website using Toolset—similar to a settings page in the WordPress admin.

Solution:

Create a custom post type like “Site Settings,” attach a Toolset field group with the needed text fields, and create one post to store the values. Then use [types field='your-field-slug' item='POST-ID'][/types] to display the values anywhere on the site.

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.

This topic contains 1 reply, has 1 voice.

Last updated by Christopher Amirian 1 month, 3 weeks ago.

Assisted by: Christopher Amirian.

Author
Posts
#2816227

Hi there,

We want a couple of fields which we can attach to a piece of code which needs te be available thru de website.

We need these fields:
'data-booking-lng': '[LANG]',
'data-booking-resort': '[NAME]',
'data-booking-token': '[ID-CODE-SERIAL]'

Is it possible to create something like a settings page in de admin area with toolset?
We want one place where we can insert a value in a text field, which will be used on different parts in the website.

Would be great if something like that is possible.

#2816357

Christopher Amirian
Supporter

Languages: English (English )

Hi,

Welcome to Toolset support.

Toolset doesn’t include a built-in “global settings” (options) page, so you cannot add one from the Toolset → Custom Fields interface.

That means you need a small workaround.

1. Create a dedicated post type (e.g. Site Settings).
2. Attach a Toolset field-group containing your three text fields.
3. Create one post in that type and fill the fields once.

Anywhere you need a value:
[types field='data-booking-lng' item='123'][/types]
123 = ID of the single settings post.

Thanks.