The tag has no wiki summary.

learn more… | top users | synonyms (1)

0
votes
2answers
62 views

How to add options to the plugin page?

I can't find a more or less clear example on how to create additional fields, so may be someone can help me here? Here is my code: function __construct(){ add_action('admin_init', array($this, ...
0
votes
1answer
121 views

Link blogname and blogdescription to the Options Framework

I'm putting together a Theme Options page, where the user(s) I'm building this for would like to be able to edit a few settings directly from this page, including of which - the Site Title and ...
0
votes
1answer
75 views

How to include stylesheet in custom admin using parent_slug

Using this code from codex: function my_enqueue($hook) { if( 'edit.php' != $hook ) return; wp_enqueue_script( 'my_custom_script', plugins_url('/myscript.js', __FILE__) ); } add_action( ...
0
votes
1answer
81 views

Ways of dealing with nested arrays within option

I stumbled upon one problem regarding too complicated(at least in my point of view) data structures stored in option field. Right now I have an array of collections and within each other there is ...
2
votes
1answer
382 views

Site Title and Tagline in Theme Options Page

I'm using the Options Framework Theme to put together an options page. The user(s) I'm building this for would like to be able to edit a few settings directly from this page, including of which - the ...
0
votes
3answers
346 views

How to store accumulate multiple option values in a single array using Options_API

I have created an option array that stores a series of options, along with their values. The problem is that I want to ACCUMULATE these options and store them in the options database. Meaning I would ...
0
votes
1answer
73 views

Make Database query only when option is updated

Below is a DB query I am using to retrieve values and place them in a WP_List_Table. Values are currently being added by add_option, then those values are converted into a custom database table ...
0
votes
1answer
120 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 ...
1
vote
0answers
117 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 ...
0
votes
1answer
104 views

Saving widget options from class method

I have a widget class (derived from WP_Widget) that has a method (called via ajax) to update part of its options(the elements order) without the user to click "Save", to set the handler I do from the ...
1
vote
2answers
49 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 ...
3
votes
1answer
358 views

How do I extract the Alt Text from an image attachment upload via the Wordpress Options Framework Plugin?

I'm currently creating a custom WordPress theme and using the WordPress Options Framework plugin to make a custom options page for my client. I'm able to easily create an image upload option and can ...
4
votes
3answers
1k views

How does object caching work?

I'm looking for a definitive answer here. When object caching is enabled, where do options and transients end up living? By default, both are stored in the database. But I've heard some references ...
2
votes
2answers
244 views

Custom style on profile options page

is there any way to style the profile page on wordpress ? I will like to add something like: Start of the page just below the <h2> tag <div id="normal-sortables" class="meta-box-sortables ...
0
votes
1answer
41 views

Plugin options page - save two related options as one entry

I created an options page for my plugin where the user can specify image dimensions which will be saved for later use. So far the image dimensions are entered by the user in one input field like ...
0
votes
1answer
170 views

populate array with posts

I want to generate an array of custom post types to add it to a options array. I'm doing this to show a checkbox group populated with custom post type. I have this array: 'options' => array ( ...
0
votes
2answers
87 views

update_option using variable name

Title may not be clear but I'm using update_option($my_option, $new_order); and for some reason it would not work but if instead I change to update_option('my-option-name' $new_order); it works. I ...
0
votes
1answer
204 views

Page Options Saving But Not Updating In Backend

I have created a custom options page for a slider that you can upload slides to. Everything works great except when trying to save the data. It will get saved and I can use it on the front end. But ...
1
vote
1answer
376 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 ...
0
votes
3answers
252 views

Add Option if Not Exists

I need to see if an option, and if does, get the value. If not, I need to add it. The Codex provides: <?php $option_name = 'myhack_extraction_length' ; $new_value = '255' ; if ( get_option( ...
0
votes
2answers
144 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 ...
6
votes
1answer
73 views

Is it safe to store a user setting you don't want the user to ever modify as a user option?

I have added some custom user options to the profile page on my site, and most are all OK for the user to modify themselves. These options live in their own section. The users have read access and ...
3
votes
1answer
196 views

Define Wordpress image size in img tag

Is there a way to output a image in a pre-determined size (Ie; using add_image_size) using just the img tag? For example, how can I make sure that the image that is echoed using this tag is the exact ...
0
votes
2answers
311 views

Get data from Theme Options and use them into meta options field in custom post type

I want to grab data from my theme options and have to use them in meta option fields in custom post types. I know how to grab theme option data and show them on front pages but don't know how to grab ...
0
votes
1answer
67 views

Wordpress custom admin functions security

i have a case in my admin panel where i need to call my own function that resides in my own php file, with a GET request. This function is actually removing entries from the database. So, i would ...
1
vote
1answer
137 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 ...
0
votes
1answer
323 views

help using get_option

I got some code from this site which is going to work great for me. If ound it in another post. What I have modified it to do is add a text box in the category edit area so that the user can input the ...
0
votes
2answers
1k 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 ...
1
vote
1answer
27 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
416 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
59 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
647 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
328 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
2k 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 ...
4
votes
1answer
510 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
100 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
2k 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
311 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
229 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 ...
0
votes
1answer
346 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/)
0
votes
2answers
4k views

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

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
66 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
56 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
168 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
129 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
174 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
1k 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
540 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 ...