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

how can I detect that option value has changed?

I am working on a plugin and I want to fire a different action based on each option value change. so how can I do that ? example: $options = get_option('ACP_settings'); if $options['acp-select'] has ...
0
votes
2answers
517 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
16 views

How to preview Google Fonts in a combobox

I have an option in my WordPress theme in which I can select +600 Google Fonts in a combobox. I added this option using a huge array containing them. But the problem is that I have to save the ...
1
vote
1answer
58 views

Saving Plugin settings to the database

I'm not a complete novice with php or wordpress but am wanting to approach this problem the most efficient way so believe asking here will help. I've got a plugin that randomly generates a quote - ...
2
votes
1answer
107 views

“Error: Options Page Not Found” on Settings Page Submission for an OOP Plugin

I am developing a plugin using Tom McFarlin's Boilerplate repository as a template, which utilizes OOP practices. I've been trying to figure out exactly why I'm unable to correctly submit my settings. ...
0
votes
1answer
23 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 ...
0
votes
1answer
20 views

Save button in theme customization page stays disabled

Ok here's the scenario: I have added a custom section to an existing theme so that it shows up in the theme customization page (customize.php). The problem I am having is that I don't know how to ...
0
votes
1answer
27 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
0answers
18 views

Settings API withing Singleton class

I've been trying to follow this tutorial but instead of just spawning code into the functions.php file, I'm trying to build a personal framework, so I can use this in other projects. Anyway, I wasn't ...
4
votes
1answer
1k views

wp_editor() fields on Theme Options Page not saving

(This is sort of a follow-up to this question.) I'm able to display the two WYSIWYG editors on my theme options page, but the values I enter into the editors aren't saved. I've read a ton of stuff ...
3
votes
1answer
51 views

How to Loop Plugin Option Field Set?

Problem/Background Currently, I'm creating a plugin for a client that will enable them to mark and modify predetermined Google Map polygons (displayed on the site) in the dashboard. I want to let ...
0
votes
0answers
45 views

Multiple file inputs in array in theme options

Trying to add multiple file inputs to theme option settings. I'm having trouble with wp_handle_upload it's giving me this error array(1) { ["error"]=> array(1) { ["img"]=> int(0) ...
0
votes
0answers
28 views

Options not saving

My options were saving properly then I edited the files and it's not saving anymore. I undo the changes on the files and I'm sure that those were the only files that I edited. One section saved ...
0
votes
0answers
22 views

File input returns null in theme options array

Trying to work out a rather complex array situation with a theme options page. While working with file upload I can't seem to get it to work. Any idea what I might be missing? Simplified example ...
0
votes
0answers
33 views

Multiple Select Boxes Settings API

I know how to do select boxes, those are easy - but how would you do multiple select boxes? where you can select and save multiple things? Would you still use the selected() function? if so can some ...
0
votes
0answers
54 views

Custom options - register, defaults and delete empty fields (Settings API)

I cant figure out how to register all of my setting fields into 1 database option. Code for my menu page: add_menu_page('Custom options', 'Custom Options', 'manage_options', 'rm_options', ...
0
votes
0answers
13 views

Two settings field in one form [duplicate]

is it possible to have two settings fields in one form? <?php echo '<form method="post" action="options.php">'; settings_fields( 'my-plugin-settings-group-1' ); settings_fields( ...
0
votes
0answers
17 views

Settings API Multiple Checkbox in General Settings

I am trying to add a custom setting at General Settings page with checkboxes. My plan to this is for users to select appropriate categories for their blog based on a list of categories through ...
0
votes
2answers
18 views

Can't add options to db

I'm trying to create a really simple options page for my wordpress site that just contains one option - a conversion rate for a currency. I have the following code: add_action('admin_init', ...
0
votes
0answers
22 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
60 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 = ...
0
votes
1answer
65 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
0answers
27 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
28 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
1answer
38 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
78 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
240 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 ...
0
votes
0answers
16 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
47 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
52 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 ...
2
votes
1answer
430 views

Save and retrieve custom plugin options value

I want to save the value of input data and retrieve it, I have gone through the tutorial of otto press. I'm new to creating WordPress plugin and what I can't understand is once I click the Save ...
4
votes
3answers
470 views

What's the best method for emptying an option created with the Settings API?

I'm trying to empty an option created with the Settings API and failing. update_option ( 'my_option', '' ); appears to do nothing, whereas delete_option ( 'my_option' ); destroys the whole option ...
0
votes
1answer
177 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 ...
7
votes
3answers
559 views

What are the advantages to the Settings API?

Let me preface this by saying that I hardly ever work with WordPress - in fact, the last time I did a site in WordPress was back during 2.2. Yesterday I made quite a mess of everything and asked ...
0
votes
1answer
26 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 ...
0
votes
0answers
53 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
72 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
48 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
21 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
89 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 ...
1
vote
0answers
39 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
55 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. ...
1
vote
1answer
493 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
636 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
95 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
68 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 ...
1
vote
1answer
71 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
0answers
125 views

Error: Options page not found when saving my Plugin-Settings

after saving my options for my plugin I am getting the options page not found error. After some research, I found, that I may have forgotten to register my option or registered the wrong one. I ...
0
votes
0answers
170 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 ...
0
votes
1answer
41 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 ...