0
votes
0answers
21 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
35 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
1answer
15 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
2answers
110 views

Can't output do_settings_sections . Can't understand why

I've this code: /* Hook to admin_menu the yasr_add_pages function above */ add_action('admin_menu', 'yasr_add_pages'); function yasr_add_pages() { //Add Settings Page add_options_page( ...
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
87 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
1answer
106 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
39 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
58 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 ...
1
vote
1answer
138 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', ...
0
votes
0answers
181 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 ...
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
71 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 ...
1
vote
2answers
163 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 ...
0
votes
1answer
95 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
104 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
106 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> ...
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 ...
0
votes
1answer
199 views

Difference between Option_Group and Option_Name in Register_Settings

I think the title pretty much says it all! I'm working my way through various tutorials on how to add an options page to my test plugin and am struggling to understand the Register_Settings function. ...
0
votes
4answers
650 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 ...
2
votes
2answers
112 views

How to display some settings for super admin user only using Settings API

I'm developing a plugin with an options page using the Settings API. I'd like to have one options array stored for my plugin, but on the settings page, I'd only like some of the settings to be ...
0
votes
1answer
216 views

How to add a Reset to Defaults button with Settings API?

How can I add a reset button when using the Settings API? I've have something like this that's storing my defaults: $slider_options = get_option( 'nextslider_options' ); /* Define the array of ...
3
votes
1answer
88 views

How to Save Different Settings Options Using Settings API and/or the Theme Optimizer

I would like to allow users to save different versions in the options panel using the Settings API and/or the Theme Optimzer. For instance, imagine that I have styled my site using via an admin panel ...
-1
votes
1answer
382 views

Creating your own options-general.php page

I wanted to develop a duplicate General Settings Page instead of the built in one and all the settings on the built-in General Settings Page will also be displayed on the new General Settings Page.. ...
3
votes
1answer
694 views

Settings API - save an array of options as one setting (array_push?)

1. Basic settings API callback. Using Settings API my $sanitize_callback validating function looks like: (...) if($type == "foo") { $valid_input[$id] = $option[$id]; } else ...
0
votes
1answer
291 views

Tabbed theme options query about add_settings_section callback function

I have been building a tabbed option page based on some tutorials I found, using the settings API. Here is the code http://pastebin.com/bbSnhFP5 . It's all actually working fine for me but it's not ...
0
votes
1answer
559 views

Settings API validation callback

I finally managed to create working validation callback for Settings API with big help of Chip Bennet, there's only one glitch that I'm not sure how to fix. Here's the foreach loop from my validation ...
5
votes
1answer
1k views

Settings API - easiest way of validating checkboxes?

I'm using Settings API and I can't get checkboxes to work, if they're set to "false" they're not even being $_POST and that's the point. Stephen Harris & Chip Bennett explained it, but I believe ...
0
votes
1answer
266 views

Settings API - how to update 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
288 views

Settings API erases itself?

I have two forms created using Settings API, and when I save one of them the other one gets erased and vice versa. Here's the whole code so you could paste it into your functions.php file and see ...
5
votes
1answer
915 views

Settings API - creating reusable form elements?

I have a set of settings fields: (...) add_settings_field( 'Option1', 'Option 1', 'textarea', 'page1', 'plugin_options'); add_settings_field( 'Option2', 'Option 2', 'textarea', 'page1', ...
1
vote
1answer
356 views

Settings API - changing add_settings_field() output?

I'm using Settings API and wondering if there's any way of editing default output of add_settings_field() function? add_settings_field('the_field', 'bar', 'foo', 'page', 'section'); function ...
2
votes
2answers
2k views

How should I use register_setting, add_settings_section, & add_settings_field in my plugin's options page?

I'm working on a settings section for my plugin, and after reading over Wordpress's documentation which is in ROGUH DRAFT status, and also the Creating Options Pages - which is also in "transition", ...
1
vote
2answers
296 views

Possible to add another setting to 'Front page displays' setting for Custom Post Type

Let me set the scene: I have a CPT that will work on a multi-site installation and some of the sites will be in a different language. For example my CPT is Case Studies I would use a URL structure ...
8
votes
3answers
592 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 ...
11
votes
2answers
2k views

How to pass variable to add_settings_section() callback?

I am attempting to automate, as much as possible, the Settings API function calls for each setting in a Plugin. Looping through the options array, and outputting add_settings_section() and ...