The Settings API, added in WordPress 2.7, allows admin pages containing settings forms to be managed semi-automatically. It lets you define settings pages, sections within those pages and fields within the sections. New settings pages can be registered along with sections and fields inside them. ...

learn more… | top users | synonyms

-1
votes
0answers
14 views

Problem Using Sorter Field in Wordpress Redux Framework [on hold]

Okay -- perhaps I'm missing something, but I can't seem to figure this out. I just did a fresh (local) install of Wordpress and the only thing I have done so far is activated the redux framework ...
0
votes
0answers
26 views

Is It Possible to Use the Wordpress Settings API Without Having the Settings put into a Table Tag?

It seems that when using the Wordpress Settings API that all settings are placed inside a table with a class=form-table. Is it possible to override that? That is to say, to simply have the settings ...
0
votes
1answer
476 views

get_option() returning empty

I'm building a settings page for a theme and the get_option() that I'm using to retrieve the settings returns only string(0) "" even though there is a checkbox field. What I want is to retrieve the ...
-1
votes
1answer
20 views

Where to adjust presets for slider options “auto rotate” (3, 5, 10, 15 seconds)? [closed]

I’m currently helping somebody out with their wp installation – and we’re a bit puzzled with the presets for a slider / corousel. The theme in use Stockholm, featuring the Visual Composer plugin. In ...
3
votes
1answer
33 views

How do I save custom options on the options page 'Reading'?

I want to add some options to the default "Reading" options page. The code I have is: add_settings_section("section_share", __("Sharing & Publishing", "honeycomb-wp"), ...
0
votes
0answers
14 views

plugin settings - multiple upload buttons in sections: how does sanitize_callback work?

my plugin' settings page includes a series of sections, each one contains an upload button: // create the input with the *exact* setting's name function myplugin_upload_cb($args) { echo "<input ...
0
votes
1answer
1k views

Uploading files using the Settings API

I've used the Settings API in the past to output text inputs and checkboxes but am unsure if I can use file inputs. My add_settings_field() is: add_settings_field( '1', 'File 1', array( $this, ...
0
votes
0answers
12 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 ...
3
votes
1answer
20 views

When should I call add_settings_section and add_settings_field?

All of the examples I've seen for add_settings_section & add_settings_field have them being called on the admin_init action. This means that they're being called when loading every single admin ...
0
votes
1answer
41 views

Wordpress modify Settings > Permalinks (options-permalink.php) Add CPT Permalink Options

How do I modify the Settings > Permalinks (options-permalink.php) admin page to add more custom permalink parameters? I'd like to add additional permalink parameters to the "Optional" section for ...
0
votes
0answers
20 views

Multiple checkboxes sanitization using the WordPress Settings API

Dear All I have a problem in sanitizing a value for a group of checkboxes, using the Settings API. I am using the following - just for demonstration purposes: add_settings_field( ...
0
votes
0answers
26 views

Upload file via settings page

Question: Is there a secure way to upload files via a plugin settings page? Context: Hello world! A feature of my plugin requires the user to upload one or more files. More precisely, JSON files ...
0
votes
1answer
55 views

custom wp_editor does not save the content in plugin settings

I am creating a custom settings page for my plugin. I have four textarea fields, Which need to be replaced by wp_editor. My problem is that I am not able to store the data to database. Bellow is my ...
0
votes
1answer
22 views

WP Page Options Array

I'm creating a page options which contain some multiple checkboxes with specific values. Here is a snippet of my checkboxes form code: <label>Global Checkboxes</label> <input ...
0
votes
1answer
20 views

How to add settings subpage from a plugin to a settings page created in theme?

I'm using add_menu_page(...) from a custom theme and I want to add subpages to that menu with add_submenu_page(...) . If I try to do it from the theme it works as expected but when I try the same from ...
3
votes
1answer
21 views

do_settings_sections() doesn't escape quotes

I'm using the Settings API on a custom settings page: <form action='options.php' method='post'> <?php settings_fields('myplugin_settingsPage'); ...
0
votes
1answer
60 views

What exactly is the purpose of settings_fields()?

In the API description for settings_fields() it reads: Output nonce, action, and option_page fields for a settings page. And a look in the includes/plugin.php file turns this up: function ...
0
votes
1answer
113 views

how to get wp_editor to save data in plugin admin page

I'm trying to use plugin settings api to add wp_editor, but the text is not saving. // add the admin settings and such add_action('admin_init', 'my_plugin_admin_init'); function ...
5
votes
2answers
5k views

WordPress Settings API, Implementing Tabs On Custom Menu Page

I've been following the WordPress Settings API tutorial series of this guy: http://wp.tutsplus.com/tutorials/theme-development/the-complete-guide-to-the-wordpress-settings-api-part-1/ So far, I've ...
4
votes
1answer
128 views

Flush_rewrite_rules not working when settings updated

I have added some custom options to my WordPress CMS within the Reading admin page. I am using these options to set some additional pages that I then have bound to custom operations. This method ...
0
votes
1answer
121 views

Customizer_register not saving custom setting to database

I'm currently trying to work on a WordPress theme based on Sage. The stage I'm at is creating custom controls to display on the customize screen for WordPress where you typically change things like ...
0
votes
0answers
11 views

Multiple page plugin settings

I am building a plugin and I have made a single setting page that is working without any issue. Since it is becoming very long, and that it is made of 3 distinct sections, I wanted to split it in 3 ...
0
votes
2answers
49 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
55 views

Setting API - Default values for options when active the plugin

I have registered two options called test33_header_logo and test33_advertising_code. I need to set default options(test33_header_logo="logo1",test33_advertising_code=123456" when activate the ...
0
votes
1answer
22 views

WordPress Setting API - There is no field in options.php

I am creating a small WordPress plugin. I created setting page and there are two user inputs in setting page. I created two option types. Those are rmpm_post_newcount and rmpm_post_newname. After ...
1
vote
1answer
48 views

Settings API - Separating PHP and HTML

I've created a plugin where the settings are configured on different tabs. Each tab saves its settings to a different field in wp_options. The HTML for each tab is separated out into its own file so ...
0
votes
0answers
14 views

update_post() on all databases of a multisite wordpress

I want to change a certain option from every single site of a multisite networks. I wrote the following that I hope will update all databases $allSites = wp_get_sites(); foreach (allSites as ...
0
votes
1answer
14 views

Getting all the settings for a plugin

Looking at the Settings API and you can register new setting using register_setting() but I can't find a way of getting all the settings for a certain plugin. Let's say I want to get a list with all ...
1
vote
1answer
67 views

How to fix Uninitialized string offset: error on a checkbox in WP Settings API

I am trying to create an options page with a checkbox field. The checkbox is working fine but when I uncheck it and save settings, an error string shows on Notice: Uninitialized string offset: 0 in ...
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
4answers
1k views

Can't get plugin settings page to save data

have a simple plugin that inserts text (a Google ad) partway through the content of a single post. I'm trying to create a settings page that will let users change the ad code, and change after which ...
0
votes
0answers
11 views

Turn on certain plugin options after plugin install

I'm having issues in finding a way to auto-activate certain plugin settings on plugin activation. So for example , after you install the plugin "Option 1", "Option 2" will be automaticly ON. Here's ...
0
votes
1answer
51 views

Splitting do_settings_sections within HTML?

This seems like it should be very simple to achieve, but I have spent far too long trying to figure it out. I have two settings sections: add_settings_section( 'cp_required_info', 'One', array($this, ...
1
vote
1answer
63 views

Storing HTML in wp_options

I'm giving my users the option to store HTML in an option with a wp_editor(), using the wp settings api to handle the form. I currently do not apply any data sanatization to it, but realize I probably ...
0
votes
2answers
166 views

Allow HTML in Settings API input field

I want to allow HTML into a plugin input field via a user, I am using the Settings API, but it strips everything HTML out. - Code below -any pointers? function plugin_settings(){ register_Setting( ...
0
votes
0answers
39 views

Select fields on a settings page

I'm trying to do it in the style of 'Example #2' on this page: https://codex.wordpress.org/Creating_Options_Pages as it seems the tidiest way I have come across to do it. The problem is I want to ...
0
votes
1answer
46 views

Two settings_fields in one form

I am trying to add my own plugin option to the Easy digital downloads plugin. The sample code is here: http://docs.easydigitaldownloads.com/article/383-automatic-upgrades-for-wordpress-plugins I ...
0
votes
1answer
22 views

Can someone tell me where I've gone wrong with this plugin's Settings page?

I've been trying to learn how to make a plugin in my spare time. I'd previously done all of the coding pertaining to the settings page and it all appeared to work well. Having completed some other ...
0
votes
0answers
47 views

Custom Settings Page not uploading Image

I am creating a custom settings page for a wordpress theme (i.e. a Theme panel). To display all the editable fields I do as follows: Create the Section for the current set of options with ...
1
vote
0answers
35 views

Save & Publish disabled for two dimensional array Customizer

I am developing custom control in customizer. Control Its 4-5 textboxes that I can sort internally. Its a foreach loop. textbox1 textbox2 textbox3 .. The data stored is in array. ...
1
vote
0answers
73 views

Cannot update my options using wp_ajax

I have implemented wp_ajax in on my options page but the value of my options are not getting saved or updated. Here is my form: public function email_settings_form(){ // Set class property ...
1
vote
1answer
76 views

Am I using the flush_rewrite_rules function in the right place?

Hello dears I'm writing an admin panel for my new WordPress plugin base on the WordPress Settings APIs. I am defining a field for changing custom post slug from this admin panel. After the custom ...
0
votes
0answers
92 views

How to add a 'Save Changes' button to this custom options page?

I have recently created a custom options page for my plugin. It has 2 sub menus, one of which doesn't contain any options but that's correct. On the main menu area (where the options are) I have 2 ...
2
votes
0answers
183 views

Custom Post Type Settings page, choose page to display archive

So, I followed the accepted answer of this post Possible to add another setting to 'Front page displays' setting for Custom Post Type but didn't entirely work, had to compare against the ...
0
votes
0answers
17 views

Settings API Tabs overriding each other and not saving

I am using the Settings API to create custom options as well as tabbed navigation to organize those options on the screen. All the tabs use the same option group, but each tab is saved under its own ...
0
votes
1answer
71 views

Custom setting field value not working inside add_action init hook

I have added custom setting options page under WordPress settings and those are working perfectly. I have tested their values also. But when I am using those values inside function file within ...
0
votes
0answers
93 views

WordPress Settings - Custom Button actions

I'm building a settings page of a plugin using the WP Settings API. So far so good, every fields are saved fine. Finally I need 2 extra custom buttons (besides the original submit button) which ...
-1
votes
1answer
37 views

Settings API saved values not getting shown in the dropdownbox

I am trying to save a value into the options using Settings API. The thing is getting saved, but no matter what I do, it always resets the dropdown box. So the saved values are not shown in the drop ...
0
votes
0answers
559 views

Saving plugin settings - ERROR: options page not found

I've created a form for my plugin settings and set the action attribute of the form to "options.php" but when I submit the form I get "ERROR: options page not found." add_action('admin_menu', ...
3
votes
1answer
113 views

Secure my “add_settings_field” translation?

I am using "add_settings_field" and want to provide translation for it , but my problem is security. So is __('My Checbox:' , 'domain') secure enough for translation? If not what can I do about it? I ...