The options tag has no wiki summary.
1
vote
3answers
77 views
Creating a plugin that will add options. Where should the options menu pages go?
I am creating a plugin for a restaurant theme that will provide a few options to add the restaurant hours of operation. Currently, I use a custom post type to control the restaurant hours but have ...
1
vote
5answers
378 views
How to store a medium amount of options?
I develop a plugin that has a not too small number of settings. So far, there has been a fixed number of them, so I store them in a Wordpress option. Now I consider letting users define (an arbitrary ...
1
vote
1answer
224 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 ...
1
vote
2answers
976 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
1answer
974 views
Working with an Array inside Your Theme Options Array - Multiple Values
I apologize if this is covered extensively elsewhere, I'm not sure how to phrase my searches on the topic.
Basically, instead of the following standard code to store data in WP-options...
$options = ...
1
vote
2answers
588 views
Where is the submitted $_POST array stored after an option page submission?
What happens, when I click Save Changes on a option page, which was created by add_menu_page()? Where is the submitted data stored before the database transmission?
A print_r($_REQUEST) returns only ...
1
vote
3answers
419 views
How to debug register_setting callback function
I am using the following code:
register_setting(
'myplugin_options', //setting group name
'myplugin_options', //option name that will be stored in the database
...
1
vote
1answer
184 views
Insufficient permissions to save options
Hi I have built a settings page which from the menu leads to:
http://www.mysite.com/wp-admin/admin.php?page=theme_options
The problem is that when I go to save the options and I am an EDITOR user I ...
1
vote
1answer
2k views
Enable page templates. How?
Basic question, but I want to enable page templates. I have one theme which has page templates enabled. I switched to another but there is no option to change the template, even when creating a new ...
1
vote
2answers
1k views
Add a series of checkboxes to theme options
Hi I made a theme options by this tutorial
This options have multicheck type by checkboxes. I don't know how to make it work. I'm try to exclude page using this multicheck.
This is my array with ...
1
vote
2answers
65 views
Wordpress DB: options-table –> 32 gzipcompression?
I just wondered what this row in the Wordpress Database refers to?
32 gzipcompression 0
I stumbled upon it in the WP options table. What if I set the value to 1.
I do already have ...
1
vote
1answer
463 views
How can I add an options page for my class based plugin?
I'm trying to use the new Settings API with a class based plugin to add a settings page. This is the code I have so far:
class simple_sample_plugin{
function simple_sample_plugin()
{
...
1
vote
2answers
769 views
Add “Post Options” for new wordpress post
How i can add "Post Options" section under wysiwyg editor?
Like this
1
vote
1answer
2k views
Correct way to serialize the data of options table?
I am writing a plugin and it require around 15 different options, . so I am using php serialization .. I am doing it by an array and update option with php serialize functions.
but when I access it ...
1
vote
3answers
253 views
Where should I update_options in a theme?
I am designing a theme where the home page (i.e. is_home()) should only display the latest blog post. I want to do something like $wp_query->update_option('posts_per_page', 1) every time I am on ...
1
vote
1answer
1k views
two tinyMCE editors in the same page
I've used this method to enter the first editor:
on functions.php:
function add_admin_theme_styles() {
wp_enqueue_style('thickbox');
}
add_action('admin_print_styles', ...
1
vote
2answers
396 views
Changing widget options via the functions.php when there are no hooks
The problem: to change a widget's options with a custom function in functions.php, when there are no useful hooks, and where there are multiple occurrences of the same widget (multiwidget).
This ...
1
vote
1answer
683 views
How can I display/hide certain content based on a Theme Option field?
I'm building a Theme Options page for my theme, and I've managed to get most of it working fine. But now I'm trying to show and hide certain parts in my theme based on a simple check box. An example:
...
1
vote
1answer
44 views
How do I handle multiple Submit buttons in plugin's option page?
I'm developing my first plugin for WordPress and I'm getting a grasp of the whole hook system. I'm now stuck on a (probably) small issue, that I could possibly circumvent, but I'm afraid of coming out ...
1
vote
1answer
24 views
Theme settings default, strange behavior before first save
I was building a theme options page with the settings API. I use an ajax call to compute some settings automatically from other pages / tabs. I noticed that all of the new settings default ("std") ...
1
vote
1answer
229 views
Add transparency to wordpress color picker?
Question: How could you add a few transparency options (none, semi-transparent and solid) to the chosen color in the wp color picker?
I'm working on a set of theme options. I am using the wp color ...
1
vote
1answer
68 views
Is there a capability for managing plugin options?
I have an Editor user that I want to let use a plugin's options without being an Administrator.
I can use $user->add_cap but can't tell if any particular capability relates to the permission to edit ...
1
vote
2answers
934 views
clean wp_options table unused rows
In my Wordpress Blog site i have installed too much plugin and remove also many plugins. In database table "wp_options" size increases approx 13MB and there are many rows which are unused at this ...
1
vote
1answer
207 views
wp_dropdown_pages() in theme admin page
Scratching my head on this one.
I have a theme option page, where I need the user to select a page to show at X location.
I am using wp_dropdown_pages() to list my pages, and they show.
But, I can't ...
1
vote
2answers
146 views
Set front page option using custom fields?
Hello wordpress gurus!
I want to be able to set the frontpage via a custom field.
So for example, in the new page area in the wordpress admin there is a custom field that displays "Set as frontage", ...
1
vote
1answer
160 views
How can I show the contents of only a few users
I'm trying to show the contents only for certain registered users. All users have the role of "agent". To hide the contents of an unregistered user, I use this code:
<?php if ( current_user_can( ...
1
vote
1answer
90 views
WordPress Network admin options page: how to store options and where will they be stored?
I'm creating an additional WordPress Network admin page, and I need to store some system-wide option.
The good thing that a config file will be generated, so no access is required from the child ...
1
vote
1answer
157 views
New custom theme option (text input) giving index error
I am using the theme-options.php file from ThemeShaper:
http://themeshaper.com/2010/06/03/sample-theme-options/
I can succesfully add new dropdown options, however when I add a new text input I ...
1
vote
1answer
174 views
Admin Theme customization
I followed instruction on the wordpress codex site on creating an admin theme via a plugin. I activated the plugin, but my stylesheet isn't being included in the <head>..
Here's my code:
...
1
vote
2answers
450 views
get_option returns undesired blank instance of a widget
I am presently trying to call the fields of a custom widget using get_option and loop through the array created from the get_option() call. The issue is that it is outputting a blank one at the end, ...
1
vote
1answer
12 views
Admin option sidebar count
I need to add a count number to a option menu item in the admin sidebar. How is this done?
I found a similar post:
Modifying admin sidebar contents to show pending posts indicator
1
vote
1answer
80 views
Full page (no WP admin menus and options) admin theme options
I'd like to drag and drop functionality into one of the admin pages and I've been wondering about the best way to implement it: an iframe or something else?
What I'd like is: Once the use choose the ...
1
vote
1answer
33 views
Transients API conditional
I have the following transient, but if the user changes the value of $url the transient should not be used. I want to know what is the most appropriate way to use this variable with the transient. ...
1
vote
0answers
91 views
How to store options in an array
I am creating a custom table to display selected options for a page called "Testimonials". The user will enter their options on a "manage testimonial settings" page, and then those options will ...
1
vote
2answers
36 views
options creation for plugins
I am new to wordpress and learning to create plugins.
I want to know how wordpress itself create options in 'wp_options' table for plugin during plugin installation or activation?
How wordpress decide ...
1
vote
1answer
22 views
Editing options pages?
I'm trying to find a way of adding a single checkbox to one of the existing options pages, most likely options-reading.php programmatically. Unfortunately, I haven't found any good references on this. ...
1
vote
1answer
46 views
How to Call pages from a Options Panel
Need a little bit of help here. I am adding this dropdown to my options panel. However, when I call my option in my template. It does not display
Here is the function for the dropdown:
function ...
1
vote
0answers
151 views
WP-Super-Cache - generate cache programmatically
I wonder if there is possibility to generate WP-Super-Cache programmatically after the cache is being purged ( after I have published a new post ). I thought of writing some kind of crawler that will ...
1
vote
1answer
117 views
API for wp menu hacks
Question changed due to new developments!
I was loooking for a way to hack the menu items in the custom menu page to add a "hide" checkbox and other options. The only way I found is to override the ...
1
vote
1answer
604 views
Multiple options pages validation for a plugin
I am writing a plugin and I decided to have multiple pages for different options of the plugin (for clarity's sake). Doing a single option was a piece of cake, but I'm encountering difficulties when ...
1
vote
2answers
372 views
How to display custom style based on theme option select box
How can I display a different style snippet if a user selects and option from my theme options page select box.
For example. To show the sidebar on the right a user would select "Right" and the ...
0
votes
3answers
2k views
Can't save options
I created theme options page using Settings API, everything works fine but I can't save options. I tried to figure it out where I missed something but I failed. Any idea what can cause this problem?
...
0
votes
2answers
427 views
Add option to “Gallery Settings” section
I want to add a option to the "Gallery settings" (when you insert a gallery into a post).
I once found some code on how to do this, but unfortunately I can't find it anymore.
I can't even remenber if ...
0
votes
1answer
153 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', ...
0
votes
2answers
1k views
How to find out if option exists but is empty?
I am using something like this on one of my plugins:
$myOption_def = "myOption Default Value";
$myOption = get_option( 'myOption' ) ? get_option( 'myOption' ) : $myOption_def;
That works fine, but ...
0
votes
2answers
261 views
How Can I add Fields in wp-option table?
I want to activate my plugin and I want to create fields in "wp_option" table. How can I do that?
0
votes
2answers
43 views
Is there any other place - besides a theme, a plugin, or a mu-plugin - that an option page might conceivably be used?
I'm creating a helper class for simplifying the creation of an option page in admin that could conceivably be used in a theme, a plugin, or a mu-plugin. I'm trying to make the class as easy to ...
0
votes
1answer
70 views
Filtering a Database Query
In a WP_List_Table example I'm using, I am seeing how to make a general query to the wp_options table in the Wordpress database.
For example, $query = "SELECT * FROM $wpdb->options";
I also see ...
0
votes
2answers
64 views
How much string content can I store in an option?
I am about to create a new plugin that fetches remote content and stores it locally for use on the WP website. I have a free plugin that does this with twitter and tweets, and I store a JSON file in ...
0
votes
1answer
197 views
Plugin options will not save in database
I'm not sure what's happening here, since this has worked in another plugin I've created. I'm simply trying to store data in the options table.
Here is the code I'm using:
function on_myplugin_start ...
