The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
0answers
11 views

How to do multiple fields under single settings field using Settings API? [duplicate]

This image is taken from WooCommerce. I've seen their code, they have their own API for settings fields. I want to stick with the WordPress' Settings API. But I liked their concepts of having ...
0
votes
0answers
19 views

Everytime I press Save Settings from a Plugin it redirects to All Settings page

I have developed a settings page for a theme in which I'm working in order to have some options to customize it. Here are all the options and here is the functions.php. I don't know why but when I'm ...
0
votes
2answers
48 views

Plugin set default setting value when it activated

I have set up my plugin option on admin panel with /** * Register and add settings */ public function page_init() { register_setting( ...
0
votes
0answers
18 views

Setting default value on plugin setting input

I'm using https://codex.wordpress.org/Creating_Options_Pages#Example_.232 to create plugin setting page on admin panel. How do I add default value in below line of code : <input type="text" ...
0
votes
0answers
17 views

WordPress Settings API - Create Groups of Settings

I am building a plugin that will utilize the WordPress Settings API for its settings for the first time (I've used option frameworks in the past). I have already created and registered the settings ...
0
votes
0answers
44 views

add_settings_field how to add a field in the default admin page using a child theme

I have a theme (tempera) that have a number of field option for something, in a fixed number of five, I want to add 3 more of them but I don't know how to do it in my child theme. This is main.php in ...
1
vote
0answers
125 views

Move Custom Fields on General Settings Page to New Location

I've created some custom fields on the General Settings page after studying up on this post: Add multiple custom fields to the general settings page. I'd really like to move them to their own ...
0
votes
1answer
578 views

Extend WP_Customize_Control with Multiple Field Control

I'm trying to figure out how to code a custom control but frustratingly all the information I find online points to the same example of creating a single textfield. I'd like to create a custom ...
0
votes
1answer
31 views

Use the Settings API to whitelist a setting, but don't output it

I have a plugin page with several settings. Four of this settings, all in the same section, need to be displayed inline rather than one above the other. However to ensure the settings are whitelisted, ...
1
vote
1answer
821 views

Default value for add_settings_field

I'm creating a simple settings page by following these instructions. Since this is a custom plugin, I'd like one of my settings to start with a predefined value (that can later be changed). What is ...
3
votes
1answer
316 views

Theme customizer: How do you grab the value later?

I'm working on a custom site, doing all my work in a child theme. I need to add one variable, slider speed, to the customize control system. I've been able to modify the custom controls via the ...
9
votes
2answers
12k views

Add multiple custom fields to the general settings page

What I would like to do is to add a few custom fields to the general settings. This is the code that Im using. It works allright but I just cant figure how to add more fields. I would like to create ...
1
vote
0answers
80 views

Settings API: Change position of custom setting field

I've searched high and low on Google and this site for an answer to this and am quite surprised to find nothing about it anywhere I've added a custom setting to the General settings tab using ...
1
vote
1answer
1k views

Multiple fields with add_settings_field callback

I have a settings page where I am creating a UI that changes column widths for a layout template. To customize this on my settings page I am using do_settings_fields for output and add_settings_field ...
0
votes
1answer
311 views

Single callback with multiple setting fields

Is there anyway you can use a single callback with multiple setting fields? Maybe there is a way to pass the setting field used through the callback?
2
votes
1answer
111 views

Settings API - generating field value based on a different field?

I store my themes settings using Settings API. If I create a new setting using add_settings_field() is it possible to create another setting that will be based on the first one? Why? Imagine I have ...
0
votes
1answer
338 views

add_settings_field (exclude categories->reading) wp_category_checklist

In settings/reading, I'm trying to add an option to exclude one or more post categories from main posts/home page. I'd like to utilize the wp_category_checklist function to create the new settings ...
1
vote
0answers
193 views

Letting user dynamically create fields using Settings API

I created a settings page, using the Settings API, following this tutorial. Now I want to have a button that lets users dynamically add fields, similar to the way it is done in this other one. I ...
2
votes
1answer
931 views

How can one utilize a variable as a callback function name for add_settings_field

I'm trying to cut down on the amount of code that is in my theme options function. I'm adding my settings like so: add_settings_field($k,$v,$callback,$the_options,$the_group,$args); This works for ...
0
votes
2answers
86 views

Best place to store company address

Ok I'm creating a site for a company, this company will have multiple users. In the footer I am trying to include the company name, phone and address but not as a widget. I need to store the ...
0
votes
1answer
93 views

Cloning add_settings_field() with jQuery

Is it possible to setup one add_settings_field() in an options backend and then use jQuery clone function on the front end and be able to create multiples of whatever and save that in an array? I've ...
2
votes
0answers
1k views

Settings API - adding setting fields dynamically?

Is there a way of adding settings fields dynamically? I have my own Settings API options generator just like in Chip Bennet's Oenology Theme, everything works perfect but I can't find a way to create ...
0
votes
1answer
235 views

Adding Form Fields with Settings API

I'm making a plugin with an administration page witch uses the Settings API. I could make one section and one option. But how can I add other form fields to it? If I add an input tag to the callback ...
0
votes
1answer
176 views

esc_url not working within add_settings_field callback

I'm trying to display a saved option of a url inside a text input on my themes' options page, but it's just simply not displaying. I've checked the database and my url is saved using the specified ...
2
votes
1answer
912 views

settings API: how to create a multi checkbox with blog categories?

i need to create a callback function with a multi checkbox with all the web/blog categories as multi options. my add_settings_fields are: add_settings_field( 'select_page', ...
5
votes
1answer
2k views

Settings API - creating reusable form elements?

I have a set of settings fields: (...) add_settings_field( 'Option1', 'Option 1', 'textarea', 'page1', 'plugin_options'); add_settings_field( 'Option2', 'Option 2', 'textarea', 'page1', ...
3
votes
1answer
591 views

Settings API - changing add_settings_field() output?

I'm using Settings API and wondering if there's any way of editing default output of add_settings_field() function? add_settings_field('the_field', 'bar', 'foo', 'page', 'section'); function ...
9
votes
1answer
5k views

How to pass arguments from add_settings_field() to the callback function?

I have a function like this: add_settings_field( 'contact_phone', 'Contact Phone', 'settings_callback', 'general'); That works. It calls settings_callback. Cool. The problem I have with this is: ...