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

1
vote
1answer
120 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
172 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
420 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
77 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
51 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
35 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
52 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
58 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
25 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
151 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
94 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
59 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
96 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
1k 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
0answers
72 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
1answer
228 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
88 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
43 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
35 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
39 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
69 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
133 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
320 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
28 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
342 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
548 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
271 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
441 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
36 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
3k 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
119 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
114 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
606 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
103 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 ...
3
votes
1answer
216 views

Add settings fields on options discussion admin page

Problem description I'm searching for a way to add a settings section/settings fields to the ~/wp-admin/options-discussion.php page exactly where Core calls… ...
2
votes
1answer
61 views

Is there a limit to the number of options you can store in one settings field of wp_options?

I have a theme with an options page. And on that page there are 1083 options. I've noticed that the last 13 are not saving. They were saving at one point, but after I added new options above them, ...
2
votes
1answer
150 views

Is it safe to post form data via Ajax to the settings api? Am I missing something?

In my Wordpress Admin, I have my theme options set-up using the Settings API. I am trying to save the theme options form using Ajax so that the page does not refresh. The only thing i needed to add ...
1
vote
0answers
218 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
1answer
57 views

Can I use add_option for a plugin categories and how?

So I am creating my first plugin for positioning ads around my site. I created one separate table where I store ads with all their options, such as position, expire date, active, name, type etc... But ...
0
votes
2answers
480 views

Color Options from Theme Customizer API not returning via get_theme_mod()

I am working with the Theme Customizer API and am going crazy trying to find the stored values. The values successfully save and update on the front-end, so they are obviously registered ...
2
votes
1answer
200 views

Add Admin Menu Inside Construct or Init

I thought I was making headway in my WordPress Development education until I ran across the Boilerplate for WordPress plugins and it uses a class object. I'm fine with that and understand those ...
0
votes
2answers
345 views

Settings API - save multiple tabs at once

In the attached screenshot you can see the structure of the theme options we are working with. There are 8 tabs and for each tab, we have created custom fields using code similar to what can be seen ...
2
votes
1answer
710 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 ...
1
vote
1answer
232 views

How to validate register settings array

I would like to know how to perform a proper validation with the register_setting() callback function. Here is a sample part of my code I want to work with: register_setting( 'wpPart_options', ...
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?
-1
votes
1answer
37 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 ...
0
votes
1answer
290 views

Settings API enable default settings on theme install?

I am still learning settings API so please forgive my noob question. I have three fields: a checkbox, colorpicker and text field (they are working), but I would like to do this: when the theme is ...
0
votes
1answer
104 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
2k views

Get URL Parameters from referer

Not 100% sure if this one classes as a php question or is specifically Wordpress... I'm implementing the Wordpress Settings API with a tabbed settings page. I've added a 'reset tab' button, but since ...
2
votes
0answers
75 views

Tab from Settings API resetting all options with INSERT INTO [closed]

I have an Options menu created with the code from Chip Bennett tutorial, the old code, though, the one from like a year ago (the new one has a much better validation structure, but still, it works ...