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

Settings API Tabs overriding each other and not saving

I am using the Settings API to create custom options as well as tabbed navigation to organize those options on the screen. All the tabs use the same option group, but each tab is saved under its own ...
2
votes
0answers
86 views

Custom Post Type Settings page, choose page to display archive

So, I followed the accepted answer of this post Possible to add another setting to 'Front page displays' setting for Custom Post Type but didn't entirely work, had to compare against the ...
0
votes
1answer
17 views

Custom setting field value not working inside add_action init hook

I have added custom setting options page under WordPress settings and those are working perfectly. I have tested their values also. But when I am using those values inside function file within ...
0
votes
0answers
22 views

WordPress Settings - Custom Button actions

I'm building a settings page of a plugin using the WP Settings API. So far so good, every fields are saved fine. Finally I need 2 extra custom buttons (besides the original submit button) which ...
-1
votes
1answer
16 views

Settings API saved values not getting shown in the dropdownbox

I am trying to save a value into the options using Settings API. The thing is getting saved, but no matter what I do, it always resets the dropdown box. So the saved values are not shown in the drop ...
0
votes
0answers
29 views

Saving plugin settings - ERROR: options page not found

I've created a form for my plugin settings and set the action attribute of the form to "options.php" but when I submit the form I get "ERROR: options page not found." add_action('admin_menu', ...
0
votes
0answers
10 views

Two settings_fields in one form

I am trying to add my own plugin option to the Easy digital downloads plugin. The sample code is here: http://docs.easydigitaldownloads.com/article/383-automatic-upgrades-for-wordpress-plugins I ...
0
votes
1answer
23 views

Category select options for plugin settings

I am using Aqua page builder and I want to incorporate dropdown catagory select field for that. <?php $my_options = array ('one' => 'My Pony','two' => 'His Pony'); echo ...
0
votes
0answers
21 views

Creating a WordPress admin section to handle file uploads and trigger a function

I need a little help on this one. I have written a series of functions that parse an excel spreadsheet with multiple worksheets. It works perfectly and does exactly what I need it to. Database tables ...
0
votes
0answers
42 views

Dropdown Settings API for get_terms Menu option

I am using get_terms to display a list of available menus and then display those menus for a plugin settings selection - that part works fine - but I can't retrieve and display the value. I am not ...
0
votes
1answer
49 views

From my Plugin Settings Page use check boxes to load specific css files (e.g. Bootstrap / Foundation)

This is my first post on here so bare with me if something goes terribly wrong. The wp plugin I am building requires bootstrap for the shortcodes it generates to be styled as expected when rendered ...
0
votes
0answers
28 views

How to assign navigation menu to certain location with Settings API?

Using the code below, one can assign a menu with id $term_id_of_menu to 'primary-menu' location. $locations = get_theme_mod('nav_menu_locations'); $locations['primary-menu'] = $term_id_of_menu; ...
0
votes
1answer
23 views

Show the submitted values in the form when validation fails

Currently I do: $options = get_option( 'jons-plugin-options' ); echo "<input id='jons-plugin-options[field-two]' name='jons-plugin-options[field-two]' size='4' type='text' value='" . ...
0
votes
1answer
44 views

Why are these settings unregistered?

After updating a WordPress site to version 4.2 (and the forced 4.2.1 security update), I get some weird deprecated errors: Functionality: Unregistered Setting The post-type-menu-page setting ...
0
votes
1answer
16 views

settings api callback functions won't display?

Hi guys I have been working with the settings API and my code won't run. I have an options page called "kaipo", and the callback function in that add_options_page function will output "hii" from ...
0
votes
1answer
21 views

Quotes not rendering properly in WooCommerce settings API [closed]

hello i'm using a setting API of woocommerce for creating form fields. what i want here is to fetch emails from database and display it in a dropdown in frontend now have fetch the emails but when i ...
0
votes
1answer
28 views

Option page not updating multiple records in settings api

Hi i am new to wordpress plugin development. i have issues with settings api. please help if you can. Below is my problem. function load_plugin() { add_settings_section('plugin_main', ...
0
votes
0answers
72 views

Save_post action hook using the add_settings_error function leads the “cannot modify header…” warning

I am fiddling on that for quite a while. I've asked a similar question already over here. Since then i've dropped according to recommendation the transition_post_status action hook as well as the ...
0
votes
0answers
128 views

WordPress Multisite on IIS 8.5 - options.php not found on save changes

I've just installed a fresh WordPress on IIS 8.5 and configured it to work with sub-directories. On the primary site everything works fine, but... The problem occurs on the sub-sites that are created ...
0
votes
1answer
26 views

Wordpress 4.1 plugin only save 1 field to database

I'm a bit lost right now as I'm doing the settings page for my plugin but only one field is stored to the database. I'm not sure how to track the problem down. Here's my code <?php // Class ...
0
votes
1answer
44 views

How to change php variable value using wp setting api

How can I change var $failed_login_limit = "2"; var $lockout_duration = "10"; value by using wp setting api? if ( ! class_exists( 'Jeba_Limit_Login_Attempts' ) ) { class ...
0
votes
0answers
38 views

When using an options array the Settings API isn't creating the database record

At the moment i am building my first plugin. So far i've saved as well as successfully uninstalled the options with single db records; everything worked like a charm. At the moment i try to improve ...
0
votes
0answers
32 views

Dropdown pages in Settings API

I am working with theme option. There is dropdown option like this. 'memory' => array( 'type' => 'select', 'label' => __('Memory', 'fw'), ...
0
votes
1answer
258 views

Save and user submitted data from a form and display them in the wp backend

My question is very simple but the answer I'm not sure if will be that simple. I'm developing a website for a non-profit organization where people can fill out a form containing questions usually ...
0
votes
1answer
48 views

Settings API Message Error is global

Am not shure how to realy use settings api for showing error messages on my menu-page. For example i create menu page (eng.product)and there i register two input text fields like example. After ...
0
votes
1answer
9 views

Unregister Settings Error

Is it possible to unregister or unset an error that has been added using add_settings_error? What I am trying to do is run some unit tests on my settings validation function, but I'd like to reset any ...
0
votes
0answers
56 views

Creating a register settings class that supports extended classes

I am having some trouble implementing a class structure to use for plugins I am developing. What I am trying to do is create a class I can just re-use for each plugin. I want it to be able to be ...
0
votes
0answers
79 views

Dropdown list of Tags, Posts, Custom taxonomies in Options panel

I've been working with WordPress Settings API to create an options page for a plugin. Everything is fine except for displaying select dropdown lists and checkbox lists for WordPress tags, posts and ...
0
votes
0answers
17 views

Add setting to widgets page wordpress

I want to add a setting to dynamically create new sidebars in the WP Widgets.php page but I cannot add the settings section, I am not sure if I am targeting correctly the widgets page. Right now I am ...
0
votes
0answers
37 views

Stop WordPress from sending custom GET parameters on form submit

I have a custom menu page I'm building for a theme. This page displays a list of items and also a form to add a new one. The table with the items also displays links to delete each of the via URL GET ...
0
votes
1answer
56 views

Hook if somebody saves plugin options?

I wrote a plugin that has various options and in case the user saves this options a CSS file will be generated. My intention is that the CSS is only created when the options are saved and not when ...
0
votes
1answer
101 views

Restrict access to options-*.php pages

I have a custom role named manager with manage_options and read capabilities , i want to restrict him not to access Settings menu, you may say remove manage_options capability but that's not the case ...
0
votes
1answer
49 views

Which action gets triggered when i save settings?

I want to write to a file but i need to write/update this file every time user updates settings.Is there any action that gets fired every time user updates settings ? Edit: I have a new menu page and ...
0
votes
0answers
65 views

Data not saved Wordpress Custom Admin Page

I try to create an option page for a Wordpress theme. I manage to create the page, the Metaboxes , but when I send the form, the data are not saved. Before I show you my code , I specify that I use a ...
0
votes
1answer
152 views

'delete_option()' only deleting the value, not the key/value pair

Recently a plugin I am developing begun throwing up an error whenever I deleted the plugin options (restored them to default). I'm using the Settings API within the plugin in question, and on another ...
0
votes
2answers
57 views

500 error when updating plugin option

I'm trying to debug a strange issue that happens on one my plugin's users system. The issue: When i submit my Plugin's Settings form (option-general.php?page=pluginname), I get a 500 error message. ...
0
votes
1answer
27 views

Settings field is not showing up in the general options page

I've tried to add a pretty basic test case based on a tutorial by creating a custom settings field in the general options page in the admin area. Problem is the settings field is not showing up, nor ...
0
votes
0answers
35 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
1answer
14 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
16 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
63 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
0answers
75 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 ...
1
vote
2answers
142 views

Output 'do_settings_sections()' as tabs, not one under the other

I'm using the Settings API on an admin page and it's marvelously simple and all that. public function on_show_page(){ ?> <div id="admin-bar-button-page" class="wrap admin-bar-button"> ...
0
votes
1answer
95 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
0answers
58 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
18 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
1answer
100 views

Flush rewrite rules on option update with Settings API

I'm working on some plugin where I need to enable custom URL rewrites. I want to enable editing of custom URL through Settings API, so basically I did everything that's needed to validate and update ...
0
votes
1answer
80 views

Plugin settings are saving but the fields

I'm following @Otto's tutorial on Settings API. I managed to save the plugin settings into the options table, but by any means can't save any fields. <?php /** * Add Settings SubMenu * Thanks ...
0
votes
0answers
85 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
77 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 ...