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
0answers
34 views

How to handle complex data with Settings API

I hope my question isn't out of the scope of this website and that someone can help me with it. I'm currently studying the WP Settings API and I'm wondering how to create a form management section ...
0
votes
0answers
320 views

Plugin settings checkbox

I am creating catagory checkbox select. My code to render the category checkbox is: // CHECKBOX - Name: plugin_options[chkbox2] function setting_chk2_fn() { $options = ...
1
vote
1answer
42 views

Where to hook settings api init

I am getting a bunch of notices in Theme-Checker for my settings api init function. The notices are all for 'undefined index' in the $_REQUEST array. Here is the code : <?php function ...
0
votes
2answers
213 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
0answers
472 views

How to integrate add_settings_section into WordPress Plugin Boilerplate?

I'm following the The Complete Guide To The WordPress Settings API to integrate the Settings API into the WordPress Plugin Boilerplate. The boilerplate creates a section specifically for adding an ...
1
vote
1answer
2k 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 ...
1
vote
0answers
51 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 ...
0
votes
0answers
21 views

Wordpress Option Api:Using Image in Checkbox

I am using radio in settings api.I want to replace "Left" and "Right" with image.My code is function menu_position() { $options = get_option('plugin_options'); $items = array("Left", "Right"); ...
0
votes
1answer
33 views

Plugin development: can't update settings with multiple settings sections

I've got my plugin options set up to be in multiple sections, for ease of use and more efficient database calls. However, since reorganizing my Options page I can only seem so save changes made in the ...
1
vote
0answers
283 views

Bulk update all posts from plugin settings screen

I'm writing a plugin right now that will populate custom metadata for all posts on the site based on a certain rule. I've already created a Plugin's settings page and a logic that should be triggered ...
0
votes
1answer
144 views

How to wrap html around Settings API add_settings_section()

I am writing a plugin and I'm currently implementing my admin menu using the wordpress settins API. As always with API's, it facilitates programming to a certain degree, but it seems like I have an ...
0
votes
1answer
107 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
24 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 ...
1
vote
1answer
177 views

Settings API repeater fields

I'm new to the WP settings API, and a fairly novice PHP developer. To get started I followed this great tutorial Using Settings API - part 1 — Create a Theme Options Page and customized it ...
0
votes
1answer
376 views

How Do I create multiple Top Level Admin Menu Pages To submit data to the options table?

I am trying to create more than one top level options page in my wordpress theme. But right now I can only save the data for one. How can I save the data for two without having to create tabbed ...
0
votes
1answer
108 views

Settings API: Two update notices after saving settings?

I've used the settings API to create a very simple page for plugin settings. This is my first time using the API, and through various tutorials online and answers here, I think I've figured it out. ...
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" ...
1
vote
1answer
182 views

Settings API - how to update multiple options manually?

I'm storing all my options using Settings API: function registerSettings() { register_setting('XX_theme_settings', 'XX_theme_settings', 'setting_validate' ); add_settings_section('theme_options', ...
1
vote
1answer
168 views

Getting error to display radio button value in General Settings page

I'm constantly getting the errors bellow when printing the radio button values from General Settings screen: Illegal string offset 'service' in ...
0
votes
0answers
677 views

How to Write update Query in wordpress for a custom field in General setting TAB?

I want to add a custom field in General setting TAB in wordpress. This are the present fields that wordpress has it by default. Site Title Tag line Wordpress Address URL ...etc I want to add a ...
1
vote
1answer
78 views

Can I use the different settings sections over different pages using the save options group?

I registered one options group with few different options sections. Each section is meant for different page. register_setting( // ...
0
votes
1answer
93 views

Setting the uploads directory

So I want to change my uploads directory. I'm able to change it using: add_filter( 'pre_option_upload_url_path', 'wpse_77960_upload_url' ); function wpse_77960_upload_url() { return ...
2
votes
1answer
36 views

Does settings API create settings on run time?

I'm tweaking a plugin and I'd like to have an option value different for each backoffice user. Currently the options are defined using the add_settings_field method that is performed in the ...
0
votes
1answer
56 views

Assigning input to variable

I am trying to create a plugin that will generate users. I am pretty new to Wordpress and my PHP is ehhhh. I got some helpful help earlier but have made a few turns since... The plugin will generate ...
2
votes
1answer
61 views

Generating User(s) with Settings API

I am trying to create a plugin that will generate users. I am pretty new to Wordpress and my PHP is ehhhh. The idea for it is for the plugin to generate multiple users when its finished. Right now ...
0
votes
1answer
26 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 ...
1
vote
2answers
195 views

Remove Internal Style Sheet if no Value Provided?

I am using this code to add my options inside head section code works but my problem is that if no values are provided my function still echoes an empty <style type="text/css"><style> into ...
2
votes
1answer
101 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
85 views

Add_menu_page and saving settings

I am working on an WP plugin and have my settings in a created menu page. When I save the page my settings are saved without any problems, but I don't return to the settings page but to a page where ...
0
votes
2answers
105 views

Issue on Checkbox with Custom Option Page

I am trying to use a checkbox on Custom Option page by using Setting API. Every thing works fine at back-end and I can update the checkbox states by registering the settings.But when I would like to ...
1
vote
1answer
2k views

How to Use Checkbox in Custom Option Page Using The Setting API

Can you please let me know how I can add a checkbox to Setting API in creating Custom Options Page? I am using the following code to add a txt box which is working perfectly but I am totally confused ...
0
votes
1answer
392 views

Run function AFTER theme options are saved?

Weird question, how can I run a custom function AFTER my theme settings are saved? I see that the register_settings() function has a sanitize callback, but that runs before the settings are changed. I ...
0
votes
1answer
130 views

Settings API - Checkboxes validation in a menu with multiple subpages

I'm building a theme using the settings API. I have a top level menu with multiple subpages and everything is working fine, except checkboxes. I am saving the options to a single options array. This ...
1
vote
2answers
44 views

Settings API in Section

I have a snippet that creates an option in Settings->General using Settings API. However, the values don't get updated and I was wondering if anyone can help point out the problem with the following ...
0
votes
1answer
40 views

Update plugin settings option_name for big plugin update

I am working on a plugin update and have changed the settings option_name and key. I would like that the old options are transferred to the new option_name. The old option name is: plugin_options ...
0
votes
1answer
47 views

Settings api sanatize callback not being triggered

I'm creating a custom settings page for a custom theme however the callbacks for sanatizing the data in the fields are not being called (I put in xdebug breakpoints in them to check). /** ...
0
votes
0answers
76 views

Theme options: Display ID of page options

I am building a theme options page and everything is great. There is a function to display the list of page options. $all_pages = get_pages(); $page_options = array(); $page_list = array(); ...
0
votes
1answer
171 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 ...
1
vote
0answers
474 views

How can I save a multiple select array with the settings API for a plug-in options page?

I'm thinking this may be more of a problem with my PHP rather than my use of the settings API, but I can't seem to get Wordpress to save an array of data for a multi-select box. The multi-select box ...
-1
votes
1answer
30 views

Custom button and html with [settings api plugin]

We are trying to improve the backend of a small plugin of ours via the settings api and we are using Tareqs http://tareq.wedevs.com/2012/06/wordpress-settings-api-php-class/ Settings API for it. We ...
1
vote
0answers
435 views

Using multiple settings_fields() on 1 settings page

I have been struggling with this one for about a week now. I would like to have 2 variables available on a settings page, but I cannot figure out how to do this using the Settings API. Perhaps there ...
1
vote
2answers
894 views

Is get_option function cached?

In my plugin, I use the following code to retrieve an option from the database: $options = get_option('my_plugin_options'); If I use this 10 times in various functions of my plugin, does WordPress ...
1
vote
2answers
358 views

Wp die causing 500 Internal Server Error?

I have function to upload images inside my settings API ,it uploads images as expected but the problem comes when user chooses to upload non-image file to stop users from uploading other files ...
1
vote
3answers
555 views

Alow users to delete uploaded images inside backend?

I am allowing user's to upload their images, so to show their uploaded images i am using<?php echo $options_images['image_bg'];?> which outputs ...
0
votes
1answer
40 views

change backend header options

Wordpress is offering backend pages for header and background under the design tab, which can be activated inside functions.php. Is it possible to customize that options? For example I would like to ...
14
votes
1answer
4k views

Settings API with arrays example

I'm using the Wrox WordPress plugin development book as a primary reference for getting started with a new plugin and I understand all settings can be saved as 1 array but the book does't give an ...
0
votes
1answer
126 views

Consequences if using PHP include TEMPLATEPATH?

I have created a Theme Options page using Settings API so now I need to style it using CSS. Instead using function like this inside functions.php function mytheme_add_init() { if ( is_admin() ) { ...
1
vote
0answers
128 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 ...
12
votes
2answers
734 views

Settings API vs Theme Customizer

When would it be appropriate to use the settings API, and when would it be better to use the theme customizer? Having Googled around all morning, I haven't been able to find any well considered and ...
0
votes
1answer
107 views

Incorporating the Settings API in WordPress Themes - by Chip Bennet

I am using the code by Chip Bennett to create a settings options page for my plugin. The problem is that I am getting a Warning error as indicated below that I cannot figure it out. Any help is ...