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
46 views

Hook if somebody saves plugin options?

I wrote a plugin that has various options and in case the user saves this options a CSS file will be generated. My intention is that the CSS is only created when the options are saved and not when ...
0
votes
1answer
24 views

Settings field is not showing up in the general options page

I've tried to add a pretty basic test case based on a tutorial by creating a custom settings field in the general options page in the admin area. Problem is the settings field is not showing up, nor ...
0
votes
1answer
71 views

Plugin settings are saving but the fields

I'm following @Otto's tutorial on Settings API. I managed to save the plugin settings into the options table, but by any means can't save any fields. <?php /** * Add Settings SubMenu * Thanks ...
0
votes
1answer
83 views

Setting conditional background image from meta value

I am trying to set background image from meta value.I am successful also.But if the meta image is not set the out put <div id="pricing" style="background: url('')"></div> But I do not ...
0
votes
1answer
125 views

Theme settings Page: Settings Api vs Update_Options

I’m a new WordPress developer trying to start a carrier selling Premium Themes. In the last week, I’ve been confronted to many difficulties trying to understand how to create a theme options page. At ...
0
votes
2answers
374 views

Can't output do_settings_sections . Can't understand why

I've this code: /* Hook to admin_menu the yasr_add_pages function above */ add_action('admin_menu', 'yasr_add_pages'); function yasr_add_pages() { //Add Settings Page add_options_page( ...
0
votes
1answer
103 views

Why won't register_setting() create a setting?

I'm stumped. I've been researching this like crazy, but I can't seem to figure out why register_setting() isn't working for me. I'm new to WP plugin development (obviously), so it's probably just ...
0
votes
1answer
21 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, ...
0
votes
1answer
68 views

Settings API settings section not appearing

Settings API always been a little confusing for me. I am trying to add a simple theme options page for a child theme I am developing. I guess I am doing something wrong that preventing the section ...
0
votes
2answers
353 views

Getting settings saved two times in settings page with tab

I tried to show tabbed settings in admin settings page by a tutorial but for me am getting settings saved notification for two times. I think it is due to different settings field but based on ...
0
votes
1answer
137 views

How to retrieve the options from this options page?

I like to write a plugin with an options-page from the WordPress-Codex, but I cannot retrieve the options. get_option('your_option'); does not work. Here is the options page code: <?php class ...
0
votes
1answer
26 views

How do I display a WP Option from an array?

I have a problem displaying the data that I am successfully saving to my database. function create_input_twitter_option() { $options = get_option('global_options_arraykey'); ?><input ...
0
votes
1answer
2k views

How to add checkbox with multiple values in table?

Right now i changed from options table to my own table so things are getting difficult i have a checkbox its name is selection in table, so here is what i tried <input type="checkbox" ...
0
votes
1answer
30 views

Can Settings API setting generate other settings?

I have a Settings API field for an address. The address is stored this form: "Address, City, Country". Is there any way of creating / generating other options based on the one above? When I save the ...
0
votes
1answer
249 views

Can't save settings to database using Setting API

I wrote a simple test code for testing saving data using Setting API, but it doesn't seem to work. it realy driving me crazy. Please help me point out the problem, thanks! function ...
0
votes
1answer
174 views

How to remove a settings section from the Theme Customization API preview pane?

I am currently working on a theme that uses the Wordpress Customization API and I need to remove some pre-existing sections from the customization preview pane. Is there somewhere like a global ...
0
votes
1answer
336 views

Difference between Option_Group and Option_Name in Register_Settings

I think the title pretty much says it all! I'm working my way through various tutorials on how to add an options page to my test plugin and am struggling to understand the Register_Settings function. ...
0
votes
1answer
2k views

How to use checked() function with multiple check box group? How to properly sanitize that checkbox group?

I'm using the theme options page from the underscores (_s) theme to build a theme options page and I have a group of check boxes on it. In the example below I've just included 2 for simplicity. My ...
0
votes
1answer
316 views

How to add a Reset to Defaults button with Settings API?

How can I add a reset button when using the Settings API? I've have something like this that's storing my defaults: $slider_options = get_option( 'nextslider_options' ); /* Define the array of ...
0
votes
1answer
70 views

How would you accomplish the following advanced settings page?

Currently I'm developing a new theme for my business. This theme will have a header section with a drop down menu, a slideshow on the background and three featured images with a title, a description ...
0
votes
2answers
1k views

Verify Submitted Form Values and Show Warning Messages with Setting API

I'm making a plugin administration page with the settings API. I'd like to know a way to display a warning message when the user submits an invalid value. For example, with the below code, if the ...
0
votes
2answers
292 views

[Multisite]How can I update custom blog option?

I wanted to update custom blog option created thru Settings Api using the function update_blog_option. I created this code. $country_base = get_blog_option($blog_id, 'mytheme_options');//retrieve ...
0
votes
1answer
166 views

Wordpress settings API VS Table In Database?

I have created an options page for my plugin using Settings API. Now I want to create another tab where user will create records. He will also like to delete/edit records. There will be 10-20 records ...
0
votes
1answer
99 views

settings api and the data passed in the parameter

in an example of the Settings API, there's an input and the callback function to sanitize/validate the result from this input : this is the input : echo "<input id='text_string' ...
0
votes
1answer
335 views

Tabbed theme options query about add_settings_section callback function

I have been building a tabbed option page based on some tutorials I found, using the settings API. Here is the code http://pastebin.com/bbSnhFP5 . It's all actually working fine for me but it's not ...
0
votes
1answer
56 views

Pause plugin option page until all data manipulation is complete

I have an option on my plugin page where I load content into all the posts in the blog. Now this takes some time, esp when there are a log of posts. Now the way is it set up now, when you press ...
0
votes
1answer
131 views

Why isn't the Settings API designed to work for plugins using custom admin menus? [duplicate]

Possible Duplicate: How should one implement add_settings_error on custom menu pages? The Settings API offers all sorts of labour saving features and future proof code. I find it really odd ...
0
votes
0answers
14 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
0answers
4 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
0answers
14 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
34 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
36 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
27 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
19 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
39 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
15 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
20 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
22 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
62 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
105 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
24 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
37 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
36 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
29 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
9 views

Unregister Settings Error

Is it possible to unregister or unset an error that has been added using add_settings_error? What I am trying to do is run some unit tests on my settings validation function, but I'd like to reset any ...
0
votes
0answers
51 views

Creating a register settings class that supports extended classes

I am having some trouble implementing a class structure to use for plugins I am developing. What I am trying to do is create a class I can just re-use for each plugin. I want it to be able to be ...
0
votes
0answers
70 views

Dropdown list of Tags, Posts, Custom taxonomies in Options panel

I've been working with WordPress Settings API to create an options page for a plugin. Everything is fine except for displaying select dropdown lists and checkbox lists for WordPress tags, posts and ...
0
votes
0answers
17 views

Add setting to widgets page wordpress

I want to add a setting to dynamically create new sidebars in the WP Widgets.php page but I cannot add the settings section, I am not sure if I am targeting correctly the widgets page. Right now I am ...
0
votes
0answers
33 views

Stop WordPress from sending custom GET parameters on form submit

I have a custom menu page I'm building for a theme. This page displays a list of items and also a form to add a new one. The table with the items also displays links to delete each of the via URL GET ...
0
votes
1answer
86 views

Restrict access to options-*.php pages

I have a custom role named manager with manage_options and read capabilities , i want to restrict him not to access Settings menu, you may say remove manage_options capability but that's not the case ...