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
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 ...
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
6 views

Updating post_meta when updating a setting with the Settings API

I'm currently using the Settings API and, on saving my options group, I need to simultaneously update post_meta based on the options that have been saved. Is there anywhere within the Settings API ...
0
votes
1answer
10 views

How to move setting field up a row on general page?

I have added my custom setting field and it appears at the very bottom of the general setting page. I was wondering if there is any way to place it under tagline field rather than at the bottom? I ...
0
votes
1answer
18 views

Unable to Retrieve Setting Value for my Plugin

I'm developing my first WP plugin, and I'm trying to use the Settings pages to create options for the plugin. // add settings page add_action('admin_menu', 'qd_button_admin_add_page'); function ...
0
votes
1answer
47 views

Customizing Latest Post Pagination

I was able to successfully implement pagination for my "Latest Posts" page. But I want to separate the numbers after the current page and put a separator between them and the last page. Here is my ...
0
votes
1answer
27 views

Option doesn't save

I am studying wordpress settings api and tried some tutorials. I want to save the option as an array. I put some defaults for the option and it works fine, but after I save the settings, it becomes ...
0
votes
1answer
137 views

Uploading files using the Settings API

I've used the Settings API in the past to output text inputs and checkboxes but am unsure if I can use file inputs. My add_settings_field() is: add_settings_field( '1', 'File 1', array( $this, ...
0
votes
1answer
16 views

Validating values using Settings API?

I'm using the Settings API to create options for plugin. Do I need to validate the input values for the security (for example stripslashes etc)? (I could not find that part in most of the tutorials). ...
0
votes
1answer
132 views

get_option() returning empty

I'm building a settings page for a theme and the get_option() that I'm using to retrieve the settings returns only string(0) "" even though there is a checkbox field. What I want is to retrieve the ...
0
votes
1answer
103 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
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 ...
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
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 ...
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 ...
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 ...
2
votes
0answers
316 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 ...
1
vote
0answers
30 views

Determining the compatibility of Settings API & Multisite

New to this forum so forgive any protocol infringements on my part and feel free to criticize so in the future I don't again. Down to the nitty gritty. I'm working on a project and am very new to ...
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 ...
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 ...
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
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
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 ...
0
votes
0answers
16 views

Return sanitized colors from an array back to options?

I have this code for sanitizing my color options but I have no idea how to return my sanitized colors array back to options? Any thougts? if ( !function_exists( 'sanitize_hex_color' ) ) { ...
0
votes
0answers
23 views

Let users to add any number of input fields in the theme option page

I've been creating a custom settings page for my own theme according to this article. What I want to know is how to let users to add any number of input fields. Just like this image I have ...
0
votes
0answers
27 views

Dynamically Update Key in Associative Array When Saving Settings

I'm updating a WordPress plugin that I've built and realized that I've made a fairly large error in my original design. This is somewhat confusing, but I'll try to explain it as best I can. On the ...
0
votes
0answers
20 views

Using Settings API to manage plugin data stored in custom table

I'm working on a plugin which needs: to store settings in wp_options table to store other data in several custom tables For the first point, I used the Settings API and everything works just fine, ...
0
votes
0answers
15 views

hide certain settings from showing on options page

I'm working on a plugin that hides certain settings in the General Settings page, like "WordPress Address (URL)" "Site Address (URL)" , but I want the rest to show. How can I achieve that, should I ...
0
votes
0answers
36 views

Make a select field directly beside a text input field with the Settings API

I'm building a plugin that needs a very simple options page. I'm asking the user to enter the default width and the default height that they want the plugin to use for their embed. I also want to give ...
0
votes
0answers
37 views

Change Post Status from Plugin Settings page

I've been going at this for a few days now, and just can't finish this off. I have a plugin that on activation adds a custom post type (CPT), adds a couple of posts to the DB in a Draft status, and ...
0
votes
0answers
56 views

Simple WP Plugin with plugin settings page

I need to create a plugin with only one select on his settings page and save select value. I have a select with all register menus and I can not to save my select value. What am I doing wrong? What ...
0
votes
0answers
29 views

Can i use third party setting api to my plugin?

I am new in wordpress plugin development platform and i am trying to develop a plugin. I need a setting option for this plugin. I have made my decision to use this ...
0
votes
0answers
36 views

Using a dropdown to alter an option value on plugin settings page

I'm trying to implement a dropdown menu on my plugin's settings page. When the user selects a choice from the dropdown and presses the Save Changes button, I need the choice's value to be appended to ...
0
votes
0answers
32 views

Tabbed navigation for plugin options using same row in database for all?

I'm trying to use WordPress' native tabbed navigation on my plugin's options page, but I'm having trouble. I've managed to get the options to display, though it displays every plugin option on every ...
0
votes
0answers
53 views

Adding a dropdown on my setting page

I have created a plugin and I have created setting for it where I have created a text field. But now I want to add a dropdown link. Can I show a thumbnail in the front of it in a dropdown, yes or ...
0
votes
0answers
43 views

Undefined index notice when using the $args parameter in add_settings_field()

I'm using the Settings API to provide my admin-user with some options for a plugin I'm writing. I have about 30 text fields to output on the plugin options page so I have created a very general ...
0
votes
0answers
15 views

How do I build a settings panel under the plugin

I'm trying to build a settings panel for my plugin that is located under the plugin on the plugin page and slides down when the user clicks the settings link like other plugins (WP Maintenance Mode) ...
0
votes
0answers
30 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
95 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
56 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
67 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
75 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
115 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
71 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
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 = ...
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 ...
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
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 ...
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(); ...