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

0
votes
1answer
14 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
16 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
16 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
45 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 ...
0
votes
1answer
40 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
8 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
26 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( ...
4
votes
1answer
109 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
0answers
28 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
18 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 ...
0
votes
0answers
13 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 ...
1
vote
1answer
41 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
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 ...
0
votes
1answer
36 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
14 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
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
46 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
50 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
76 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
32 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
21 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
33 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
27 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
53 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
64 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
57 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 ...
0
votes
0answers
16 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 ...
2
votes
0answers
151 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
1answer
57 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
66 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
25 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
300 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', ...
0
votes
1answer
33 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
47 views

Category select options for plugin settings

I am using Aqua page builder and I want to incorporate dropdown catagory select field for that. <?php $my_options = array ('one' => 'My Pony','two' => 'His Pony'); echo ...
0
votes
0answers
49 views

Creating a WordPress admin section to handle file uploads and trigger a function

I need a little help on this one. I have written a series of functions that parse an excel spreadsheet with multiple worksheets. It works perfectly and does exactly what I need it to. Database tables ...
0
votes
0answers
100 views

Dropdown Settings API for get_terms Menu option

I am using get_terms to display a list of available menus and then display those menus for a plugin settings selection - that part works fine - but I can't retrieve and display the value. I am not ...
0
votes
1answer
71 views

From my Plugin Settings Page use check boxes to load specific css files (e.g. Bootstrap / Foundation)

This is my first post on here so bare with me if something goes terribly wrong. The wp plugin I am building requires bootstrap for the shortcodes it generates to be styled as expected when rendered ...
0
votes
0answers
61 views

How to assign navigation menu to certain location with Settings API?

Using the code below, one can assign a menu with id $term_id_of_menu to 'primary-menu' location. $locations = get_theme_mod('nav_menu_locations'); $locations['primary-menu'] = $term_id_of_menu; ...
0
votes
1answer
34 views

Show the submitted values in the form when validation fails

Currently I do: $options = get_option( 'jons-plugin-options' ); echo "<input id='jons-plugin-options[field-two]' name='jons-plugin-options[field-two]' size='4' type='text' value='" . ...
0
votes
1answer
69 views

Why are these settings unregistered?

After updating a WordPress site to version 4.2 (and the forced 4.2.1 security update), I get some weird deprecated errors: Functionality: Unregistered Setting The post-type-menu-page setting ...
0
votes
1answer
45 views

settings api callback functions won't display?

Hi guys I have been working with the settings API and my code won't run. I have an options page called "kaipo", and the callback function in that add_options_page function will output "hii" from ...
0
votes
1answer
36 views

Quotes not rendering properly in WooCommerce settings API [closed]

hello i'm using a setting API of woocommerce for creating form fields. what i want here is to fetch emails from database and display it in a dropdown in frontend now have fetch the emails but when i ...
0
votes
1answer
49 views

Option page not updating multiple records in settings api

Hi i am new to wordpress plugin development. i have issues with settings api. please help if you can. Below is my problem. function load_plugin() { add_settings_section('plugin_main', ...
0
votes
0answers
145 views

Save_post action hook using the add_settings_error function leads the “cannot modify header…” warning

I am fiddling on that for quite a while. I've asked a similar question already over here. Since then i've dropped according to recommendation the transition_post_status action hook as well as the ...
0
votes
0answers
222 views

WordPress Multisite on IIS 8.5 - options.php not found on save changes

I've just installed a fresh WordPress on IIS 8.5 and configured it to work with sub-directories. On the primary site everything works fine, but... The problem occurs on the sub-sites that are created ...
0
votes
1answer
38 views

Wordpress 4.1 plugin only save 1 field to database

I'm a bit lost right now as I'm doing the settings page for my plugin but only one field is stored to the database. I'm not sure how to track the problem down. Here's my code <?php // Class ...
0
votes
1answer
58 views

How to change php variable value using wp setting api

How can I change var $failed_login_limit = "2"; var $lockout_duration = "10"; value by using wp setting api? if ( ! class_exists( 'Jeba_Limit_Login_Attempts' ) ) { class ...
0
votes
0answers
39 views

When using an options array the Settings API isn't creating the database record

At the moment i am building my first plugin. So far i've saved as well as successfully uninstalled the options with single db records; everything worked like a charm. At the moment i try to improve ...
0
votes
0answers
79 views

Dropdown pages in Settings API

I am working with theme option. There is dropdown option like this. 'memory' => array( 'type' => 'select', 'label' => __('Memory', 'fw'), ...
0
votes
1answer
614 views

Save and user submitted data from a form and display them in the wp backend

My question is very simple but the answer I'm not sure if will be that simple. I'm developing a website for a non-profit organization where people can fill out a form containing questions usually ...