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
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
2answers
515 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 ...
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
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
37 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
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
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. ...
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 ...
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 ...
0
votes
1answer
48 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
1answer
59 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 ...
0
votes
1answer
37 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
1answer
95 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 ...
0
votes
1answer
35 views

How to add options for Pages?

I would like to show an input field on the bottom, everytime, when a user create a new page. How is it possible?
0
votes
1answer
97 views

options validator input is false?

I have a form that looks as such: <form action="options.php" method="post"> <ul class="nav nav-tabs"> <li> <a href="#content" data-toggle="tab">content</a> ...
0
votes
1answer
59 views

How to prevent options.php deleting valid existing data from the database

I am setting up a plugin and have used the setting API for the first time to create a form in settings. The data for the plugin is initially created by default when the plugin is activated and stored ...
-1
votes
1answer
35 views

illegal offset in option add

I downloaded a plugin to dissect that I could use to learn the settings api with. It's a simple background uploader and as you can see fairly straight forward. When trying to recreate it however using ...
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 ...
1
vote
0answers
222 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
vote
0answers
97 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 ...
1
vote
0answers
197 views

Settings API store serialized data in the database (The Right Way)

Im trying to learn Settings API and I'd appreciate if someone could clarify this for me. I want to store serialized data in the database. Im using a class to do all the work for me. Heres what I ...
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
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 ...
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 ...
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
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
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
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
0answers
76 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 ...
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 ...
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
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
0answers
32 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
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
165 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
0answers
60 views

Upload button is not working under add_menu_page

I was trying to add an option panel to my theme and followed a tutorial: How to Integrate the WordPress Media Uploader in Theme and Plugin Options. Everything's perfect until I wanted to show the ...
0
votes
0answers
64 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
0answers
257 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 ...
0
votes
0answers
29 views

Problem outputing my theme options

If you take a look at my code you can see I've tried outputing the options stored within the settings fields and sections I've created. Its my first time developing a theme-options page of this ...
0
votes
0answers
74 views

Settings- API: Creating setting fields on-the-fly

In this tutorial about how to create a settings page, the author creates a select element with style display:none. <li class="front-page-element" id="front-page-element-placeholder" ...