The tag has no wiki summary.

learn more… | top users | synonyms (1)

1
vote
1answer
29 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. ...
0
votes
2answers
488 views

In widget, the value of select field doesn't get updated, changes after saving

I'm building a simple widget which will allow the user to select a post among a list of posts. For some reason, when I select an option, I believe it actually gets selected but the option doesn't ...
1
vote
1answer
65 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 ...
0
votes
1answer
762 views

The Correct Way to Use Nonce Field without Settings API

I'm trying to create an admin option page without the Settings API for some reasons. Then if I do so, I've heard that I need to use nonces for security. I'd like to know the correct way to use them. ...
0
votes
1answer
494 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 ...
0
votes
2answers
3k views

Efficient way of saving plugin options

I'm considering the saving of options for a plugin I'm developing. The first obvious candidate is the wp_options table. While reading the Pro WP Plugin Development book I came across this: Every ...
5
votes
2answers
674 views

Why does WordPress use serialize rather than json_encode for the options table?

I have a basic understanding of serialize (I come across it often when I'm migrating WordPress installs) and I just discovered json_encode. Given that serialize causes so much trouble with replacing ...
0
votes
1answer
106 views

Are there risks associated with using wp_options table using wpdb to update theme options

I am making a theme and it has so many options that need to be updated via jquery's ajax.Having looked at ways of updating wp_options via ajax,i have hypothesised that updating the wp_options table ...
1
vote
2answers
3k 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 ...
4
votes
2answers
2k views

Add on the fly tabs to plugin options

Hi I am building a plugin options page. What I'd really like to do is implement repeatable tabs (which I know is possible with the Settings API), but with a twist I haven't seen in any options panel ...
1
vote
1answer
359 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
0answers
291 views

WP-Super-Cache - generate cache programmatically [closed]

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 ...
0
votes
1answer
438 views

Google fonts dropdown in Options Framework

Is there a way to add a Google Fonts dropdown to the Options Framework panel (http://wptheming.com/options-framework-theme/)
1
vote
2answers
7k views

Contact form 7 select box different value-text then content-text in option [closed]

DSoes anyone know how I can set a different valute in the select-options in contact form 7 plugin? Here is an HTML example of what I'm trying to do <selct> <option value="1">My ...
0
votes
1answer
69 views

retain querystring values when savincustom options in admin

Quick question, I have a custom options page which posts to options.php, however I have a few sections to my options page where i change the post url like so: <form ...
0
votes
1answer
73 views

wordpress theme option in other templates

I am using word press theme option panel and using those in my header.php without any issues, code as follows... <?php // loading theme options. used in header.php global $options; ...
1
vote
2answers
178 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
132 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 ...
0
votes
2answers
208 views

how to get the post id in the option tag

$term_id .= $_POST['main_brand_id']; $term = get_term( $term_id, 'state' ); $slug = $term->slug; global $post; $args = array( 'post_type' ...
5
votes
2answers
2k views

WordPress Theme Options Import/Export

I already have a theme options page that saves to wp_options > kittens_options. I'm looking for a simple way to incorporate an import/export textarea of those options on my options page. I've ...
0
votes
1answer
695 views

Saving multiple fields as array

I'm adding a settings section to a theme that will allow the user to enter testimonials which will be randomly displayed on the site. Each testimonial has 2 fields, author and testimonial, I've ...
12
votes
3answers
2k views

How to add Custom Blog Options to new blog setup form?

Seems like a simple enough requirement, but I'm struggling: I want to add an option field to the "Add New Site". A simple text option is fine. How do I do this? I need to save this custom blog ...
0
votes
1answer
284 views

Default Plugin Settings Not Writing to Database

I have my plugin setup as such: Main plugin file mouldings.php <?php /* Plugin Name: Moulding Profiles Plugin URI: Description: Creates a 'Moulding Profiles' and 'Idea Gallery' custom post ...
6
votes
3answers
333 views

Releasing new plugin version, how to rename old options keys?

I have everything ready for publishing a new version of my plugin but one last issue stands... The old version had no naming convention for its key option names. The options grew and I renamed all ...
0
votes
1answer
95 views

Need to add/remove group of options and display them as rows

I am creating a plugin which has 5 textbox for options. What I need to do is to treat these 5 options as 1 item, and being able to add more items. I've always worked with static hardcoded options for ...
1
vote
1answer
200 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( ...
2
votes
2answers
1k views

Get category slug and display it on a query_post

I just read "How to create option page for wordpress theme" in wp.tutsplus.com - I have a problem with getting categories . there is two parts to my question - Part A - Get category slug and ...
0
votes
2answers
200 views

Multisite Plugin - Access options (wp_options) on child sites

Is there a way I can access the wp_options table of all the child sites? I want to create a multisite plugin that can be setup at the network level and will populate the child site plugins with ...
0
votes
1answer
284 views

WordPress theme options tabs

It is possible to create tabs in admin panel in Theme options like in Theme? Please see this screenshot: I can't find any official documentation about adding admin tabs.
0
votes
2answers
609 views

When to use custom DB tables or add_option?

I've got a pretty straight forward question. When does it become too much data to use add_option, update_option, etc, and instead use a custom DB table? For example, if a plugin stores thousands and ...
3
votes
1answer
714 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 ...
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
272 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
140 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
292 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 ...
0
votes
1answer
802 views

How to save Wordpress Options as an array?

How do I save options as an array using forms? I don't want to use Settings API. Here's working form that saves 3 options separately: <form method="post" enctype="multipart/form-data" ...
2
votes
1answer
2k views

How can you upload an image from within a settings page?

Is there an easy way to include an upload box to your settings page? I am building an Open Graph options page and I like users to upload a standard image directly from that page.
1
vote
1answer
836 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 ...
5
votes
1answer
1k views

What's the difference between Options & Settings?

And which one should I use? What's the difference between Options API and Setings API? I have a theme with over 100 admin options, how should I register & store them? At this moment I'm using ...
0
votes
2answers
527 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?
1
vote
1answer
591 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() { ...
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", ...
4
votes
3answers
214 views

Fallback when Transient API fails

I'm trying to figure out how to best solve an issue I have with 3rd party API's (OG, Foursquare, Yelp, etc.). I use the transient API to call and store the various data in order to: Not exceed any ...
0
votes
1answer
321 views

Options don't save, validation callback not executed

I have been using settings API for my plugins for some time and it used to work well. Now it is broken and I can not figure out why. Apparently, the option validation function is not even called. Form ...
4
votes
1answer
1k views

Confirmation before deleting plugin options via uninstall.php

I'm creating a WordPress plugin and have the uninstall.php file ready. It deletes the options used by the plugin on deletion. What I'd like to do is to popup a dialog box asking whether to delete or ...
0
votes
1answer
151 views

Theme Options Menu Item - Permission Issue

I am trying to create a theme options menu item for my custom theme. However, when I add the following piece of code in the functions.php file... add_menu_page('Page title', 'Asteria', ...
0
votes
1answer
101 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
723 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
187 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 ...