The tag has no wiki summary.

learn more… | top users | synonyms (1)

0
votes
1answer
272 views

wp_dropdown_categories initial value

I am currently pulling in an option drop-down of a specific category using: <?php wp_dropdown_categories('child_of=20'); ?> I would like the initial value of the drop-down to say 'Bedrooms' ...
-1
votes
1answer
75 views

Integrating CSS Into a WP Function Call [closed]

Below is a code I use to display post views. It is integrated with an options panel which allows users to choose whether to display it. I would like to integrate the div class .postviews directly ...
0
votes
1answer
59 views

Can I use add_option for a plugin categories and how?

So I am creating my first plugin for positioning ads around my site. I created one separate table where I store ads with all their options, such as position, expire date, active, name, type etc... But ...
0
votes
1answer
159 views

Option does not save or update upon page refresh

So I managed to get the issue of headers working properly in my theme, but I have a new issue with options though. I have the three following pieces of code that work in the order I paste them: ...
1
vote
3answers
399 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 ...
0
votes
2answers
243 views

Custom Theme Fields in Settings Menu - apply filters to one of those fields?

I found an interesting concepts of adding an additional option to the "General Options" in Wordpress. /** * Custom Theme Settings * see http://digwp.com/2009/09/global-custom-fields-take-two/ */ ...
0
votes
2answers
57 views

Wordpress options text format

Wordpress converts my theme options text with smart quotes. I know that to remove problem from posts etc: remove_filter('the_content', 'wptexturize'); remove_filter('the_excerpt', 'wptexturize'); ...
1
vote
1answer
55 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") ...
3
votes
2answers
378 views

Plugin options autoloading

In the book 'Professional WordPress Development' I found this tip: As a rule of thumb, if your options are needed by the public part of the blog, save them with autoload. If they are only needed in ...
0
votes
1answer
47 views

Caching of SQL queries

Within one plugin file I have several calls to the same option in the database via get_option(). Does WordPress do a database query every time I use get_option()? Would it be better to get the option ...
0
votes
3answers
390 views

Creating on-page options for Custom Post Type

I'm creating a plugin for creating Landing Pages. I use custom post type and custom fields for the landing pages, but i need to add some on-page options for each entry. For example i need to have a ...
1
vote
2answers
456 views

How to use a newly registered setting with a checkbox and the default value 'true'

I'm currently working on a plugin in which I would like to have a new setting (called 'show_introduction') that has the default value 'true'. I did this by the following which is hooked into ...
0
votes
1answer
691 views

Error: options page not found

This error is really well known and every where I look its either I am not doing: <form method="post" action="options.php"> or I am not registering my options, which is not the case as seen ...
0
votes
1answer
652 views

Theme Option select values

I'm building a theme options panel and so far been successful, except with the "Select" type option. This is my code: array( "name" => "Transition", "desc" => "Choose the type of ...
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 ...
4
votes
1answer
314 views

Performance with autoload and the options table

I am playing around with the autoload column of the options table. I didn't find much information about how the autoloaded values are used. I tried a print_r($GLOBALS) and saw that the autoloaded ...
0
votes
1answer
132 views

My first plugin doesn't save the data in options

This is my entire code. It doesn't save the data I enter on the plugin settings page. I don't have a clue on why this happens! Can somebody please help me? <?php // add the admin options page ...
3
votes
1answer
94 views

Outputting results from select box option in options panel

I'm trying to figure out how to get the results from a select box option and apply them to my theme. When I use a text input or color picker it works fine. But when I use a select box, nothing is ...
0
votes
2answers
386 views

Plugin getting Cannot modify header information errors

I am trying to build my first plugin but am receiving the following error: Warning: Cannot modify header information - headers already sent by (output started at ...
0
votes
1answer
213 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
2answers
50 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 ...
2
votes
2answers
118 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 ...
0
votes
2answers
73 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
150 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
80 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
89 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
493 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
486 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
77 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
148 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
124 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
115 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
54 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
467 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 ...
5
votes
3answers
3k 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
294 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
42 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
203 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
93 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
244 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
496 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
475 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
255 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
77 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
235 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
369 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
69 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
163 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
434 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 ...
1
vote
2answers
2k 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 ...