Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms (1)

0
votes
1answer
102 views

How to get values from network settings panel?

I'm using wordpress 3.3. I've created a plugin My plugin details: My plugin creates a sub menu under Network settings and create two form fields to define adsense code (200 x 200 ad, 300 x 250 ad). ...
1
vote
2answers
2k views

Add “Post Options” for new wordpress post

How i can add "Post Options" section under wysiwyg editor? Like this
0
votes
2answers
738 views

How to save user meta on custom admin page

I have removed the edit profile page from WP admin as I don't want users to be able to edit their details as this is a closed intranet and their details are fed from AD. However I do want them to be ...
0
votes
1answer
188 views

update_option creates an option, which empties on a blog reload

I am currently writing a plugin that allows all authors to be listed on a page. I've created an options page and wanted to create a function that allows administrators to exclude certain authors from ...
1
vote
2answers
487 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 ...
3
votes
2answers
419 views

WordPress Admin back-end - advanced options page?

Am I losing my mind? I seem to recall that somewhere in the Admin back-end there was a page that basically listed out all the fields within wp_options. Does this ring a bell to anyone else? I thought ...
0
votes
1answer
185 views

Only show theme option if it option exists

I have a slideshow in a custom theme I am developing and I am using the UpThemes Framework, what I want to know is, is there a way and image will only display if it has been defined? For example, at ...
1
vote
1answer
533 views

Can't save checkbox option

I know this is a mess, but can someone tell me why I can't save to checkbox option in this plugin? /* Runs when plugin is activated */ register_activation_hook(__FILE__,'vigtigt_besked_install'); ...
1
vote
1answer
2k 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 = ...
12
votes
2answers
2k views

Are all options loaded to memory on each request?

Are all options variables fetched from the database and loaded to cache on each request?
0
votes
1answer
284 views

Save user-specific options in WordPress admin

I'm writing a plugin that need to save user specific option in an admin page. I'm only thinking of adding username-prefix to option, for example: $options = get_option('username-plugin_options'); ...
0
votes
1answer
195 views

Getting values from options page to css

i got an options page that needs to affects a certain (for now) css value.. i have about using php variables in css and creating custom global variables in wordpress but havent something easy enough ...
2
votes
2answers
298 views

Separate backend “Widgets” page for each language

Im currently trying to make my backend work with multiple languages. Im using qTranslate as my translation plugin. So far I have accomplished a custom option page with multi-language support. When ...
0
votes
1answer
207 views

Defining hooks within (php)classes?

I have been trying to write a reusable modular options class and I am stuck at this specific point. How do i define hooks within php classes? Try 1 : class super_options { // ...
2
votes
2answers
2k views

How to set up default values for a plugin?

What is the best way to go about setting up default values for a plugin? Should I just insert those values into the wp_options table? AND...if that's the best way to go about it, I have another ...
0
votes
2answers
3k views

Does WordPress MultiSite use separate MySql databases?

I ask because I cannot find the options from a plug-in I created on my second blog. Adding this plug-in to the main site and the options show up. I am confused because there is a column in ...
0
votes
1answer
80 views

Widget options - where to put them?

I have a widget which I want to add a couple of options. The options are effectively 'global' for the widget - username and password details to a secured web service. So in effect, wherever the ...
0
votes
2answers
563 views

How to dynamically change theme's slogan from admin?

how can achieve this functionality. That I can change the themes "slogan" from admin and I don't have to go edit the themes source files. I think that there is some theme options functionality. But ...
3
votes
1answer
3k 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'm doing it by an array and update option with php serialize functions. but when I access it from ...
1
vote
1answer
183 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 ...
4
votes
3answers
490 views

What's the best method for emptying an option created with the Settings API?

I'm trying to empty an option created with the Settings API and failing. update_option ( 'my_option', '' ); appears to do nothing, whereas delete_option ( 'my_option' ); destroys the whole option ...
10
votes
1answer
404 views

Limit the number of inactive widgets

I'm trying to restrict the number of widgets from the "wp_inactive_widgets" sidebar to maximum 10, because the widgets admin page is incredibly slow: add_filter('pre_update_option_sidebars_widgets', ...
0
votes
1answer
2k views

Selecting multiple options onclick

I have a bunch of options that I'd like the user to be able to change in bulk. Here's my code example. When this option selection changes, <label>Default author</label> <select ...
1
vote
2answers
815 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 ...
0
votes
1answer
353 views

How can I clear memcached WordPress site options by hand?

Ater rebooting a memcache node, I am getting an error on root blog only, with a telling error log message from wp-includes/ms-settings.php. [Thu Jul 07 18:55:27 2011] [error] [client 12.34.56.78] PHP ...
1
vote
1answer
207 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 ...
0
votes
1answer
813 views

SELECT field options disappear when saving widget

I'm having an interesting problem that I can't seem to solve. While creating a widget, I have created a select field with options that can be chosen on the widget screen. It all works perfectly fine, ...
2
votes
1answer
203 views

Restore a Plugin's Default Settings

Is there a way to code "Restore Defaults" button into a plugin options page? I'm writing a plugin right now that has sets up some default values on activation (via register_activation_hook), and I'd ...
2
votes
1answer
751 views

WordPress plugin options and jQuery

I'm creating a plugin that uses jQuery to modify some css, but what I can't figure out is how you can control the execution of the jQuery with WordPress plugin options (like checkboxes true/false). ...
1
vote
3answers
335 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 ...
0
votes
1answer
113 views

What's the easiest way of adding more options in the Theme Options of the twenty eleven theme?

Wordpress 3.2 beta comes with twenty eleven. It has a Theme Option panel in the Appearance section: I would like to know what's the easiest (and extendible) way of adding more options to that ...
1
vote
1answer
178 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: ...
2
votes
2answers
247 views

Wordpress Plugin Setting's POST

I've developed a few plugin for Wordpress. Currently I've not been able to replicate the way wp save settings. I've a setting page which I learned from a tutorial. It POST to option.php, and wp take ...
-2
votes
2answers
781 views

I don't have permission to save the theme options I created myself?

I created an option panel following a tutorial. But each time I try to save the settings I get the following: You do not have sufficient permissions to access this page. Any suggestions to fix ...
10
votes
2answers
2k views

How to add field for new site-wide option on Network Settings screen?

I'm working on a plugin, and part of it involves setting an option value that applies to all sites in a WordPress network. I know about the add_site_option and get_site_option functions that let you ...
1
vote
3answers
697 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 ...
0
votes
2answers
2k views

Save Theme Options (options.php) From The Frontend

I try to save an option from the frontend but i can't find yet how to do it. So, the idea is to give the blog owner a simple form with a dropdown that can select a different stylesheet.css. I have ...
2
votes
1answer
763 views

How to add multiple checkbox elements to media attachments?

Based on solved question from: How to add a checkbox element to attachments editor with example Theres an example of multiple Checkboxes, for example: Colors, patterns, etc... A grouped list but ...
2
votes
2answers
4k 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 ...
0
votes
2answers
705 views

PHP class to add pages and fields in admin panel

I'm trying to build a little class to help build some simple input fields into a custom page in WordPress admin panel, here's what I've got: <?php class create_panel { public $default_settings = ...
2
votes
1answer
167 views

On Install, which code sets the 'home' option?

I'm just doing some wordpress development and wondered for a brand new install, which code within core is generating the first value that get's filled into the home option? I'm looking for the code ...
4
votes
2answers
527 views

Submenu pages delete settings from options array when saved

I'm writing a theme and adding a menu with several submenu pages. It works fine, except that I'm trying to use only one array to save all the settings into the database and this is causing some ...
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
4answers
2k views

How to verify this checkbox is checked?

Actually I want to include a file if the checkbox is checked <?php $checked = get_option('automatic') ? "checked='checked'" : ""; echo "<input type='checkbox' name='automatic' $checked />"; ...
2
votes
1answer
66 views

Environment Specific Options Token

Is it possible to add a token to any wp-option that could be replaced on get where the token being defined in a plugin’s option or the configure file? E.g. ...
1
vote
1answer
2k 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', ...
2
votes
3answers
2k views

Where to hook register_settings for Settings API when also want to update options outside of Settings API?

The Settings API is a convenient way to add administrative options. Tutorials on the settings API hook register_setting to admin_init. But what if you also want to programmatically change the same ...
0
votes
3answers
2k 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 ...
1
vote
5answers
571 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 ...
0
votes
1answer
310 views

Uploading and inserting an image using a custom option panel like in the Twenty Ten theme?

Twenty Ten gives the option to change the background image of the header. Where is the code involved in this feature? (uploading the picture and adding the picture). I would like to mimic this ...