The tag has no wiki summary.

learn more… | top users | synonyms (1)

1
vote
0answers
72 views

Image upload and other options in the same plugin settings form?

I write a wordpress plugin. My plugin has two options. One is an image upload mechanism and the other is a checkbox. My code is below: <?php /* Plugin Name: Plugin Name Plugin URI: Description: ...
1
vote
1answer
65 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
147 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
39 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
2answers
413 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 ...
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 ...
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 ...
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. ...
1
vote
1answer
64 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
272 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
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 ...
1
vote
2answers
457 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
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 ...
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
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 ...
0
votes
1answer
261 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
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
2answers
219 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
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 ...
0
votes
2answers
68 views

How do you update a network option value in the DB via a hook

I am trying to update the value of an option in the DB for all sites within my multisite, but no success here is the code, been pulling my hair out for the last 2 hours: function ...
0
votes
2answers
505 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
49 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
136 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
1answer
430 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
1answer
781 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" ...
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 ...
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 />"; ...
0
votes
2answers
455 views

Accessing variable from admin panel?

I've created my own admin page in wp-admin folder using add_theme_page() function. How to pass variables from there to my blog? I mean what's the easiest way without arrays etc. I've tried using ...
0
votes
1answer
64 views

delete_option() and update_option() returning false

I know that when delete_option() or update_option() fail to perform their respective database interactions, they return false. Does anyone know why they wouldn't be able to perform these actions? ...
0
votes
2answers
807 views

Warning: Illegal string offset on theme options page [closed]

Im creating custom theme options and Im getting this PHP error: Warning: Illegal string offset in ... on line 75 // adding the page to menu add_menu_page('Theme Options', 'Theme Options', ...
0
votes
1answer
41 views

Enqueue scripts based on options

What is the best method to enqueue scripts based on options I have? Let's say I have 50 options and for each I need to enqueue a script(some of them might repeat.). Can I have any ...
0
votes
2answers
98 views

Issue on Checkbox with Custom Option Page

I am trying to use a checkbox on Custom Option page by using Setting API. Every thing works fine at back-end and I can update the checkbox states by registering the settings.But when I would like to ...
0
votes
1answer
158 views

Passing dynamic options from backend to frontend

I have created an admin options page (using the Redux Theme Framework), in which the admin can customize the website's appearance (text color, background color, background repeat options, etc.. ). ...
0
votes
2answers
44 views

meta fields for the whole wordpress site

Is there a simple way to store additional information related to the whole website in a meta field? For users, comments or posts, I learned how to use meta fields to store their additional related ...
0
votes
1answer
70 views

Problems to disable the comments for my statics pages

I am pretty new in WordPress world (I came from Joomla). I am developing a mainly static website using WP (because maybe in the future I will have some dynamic behavior and because WP is pretty ...
0
votes
1answer
178 views

Wordpress theme options framework, I can't read them in my templates

I successfully created my theme options page using this framework: https://github.com/devinsays/options-framework-theme The problems Is that when, for example, I try to load the Option: 'logo_image' ...
0
votes
2answers
379 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
2answers
69 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
137 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
112 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 ...
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 ...
0
votes
1answer
406 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
1answer
68 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
269 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 ...
0
votes
2answers
579 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 ...
0
votes
2answers
667 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
264 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
193 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 ...
0
votes
1answer
206 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 { // ...
0
votes
2answers
544 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 ...