Plugins are tools to extend the functionality of WordPress. This tag should not be used to mark requests for plugin recommendations, which are off-topic per the FAQ.

learn more… | top users | synonyms (2)

10
votes
4answers
1k views

Is it bad practice to create own table for a plugin?

If I want to save settings for my plugin then it is pretty easy and straight forward. Now I would like to save to the database a bit more. A file name, and 3 other values that only apply to that ...
10
votes
5answers
394 views

Using WordPress as a CMS: Developer preferences for custom vs existing plugins

I was just wanting to gauge some general feedback on how developers use WordPress as a CMS. I've started having a few client requests for websites built on WordPress. Most of the time, they're pretty ...
10
votes
3answers
3k views

What could a hacker do with my wp-config.php

I am trying to secure my wordpress blog. I read some posts on the web that I should change my table_prefix and hide my wp-config.php. However, I do not get it? What could an attacker do with my ...
10
votes
2answers
289 views

How Can I Securely Implement a Password-less Login Feature?

Just posted a new plugin: No More Passwords I currently have it tagged beta because logging into a platform is a sensitive issue and I don't want to release something that may have security holes. So ...
10
votes
4answers
876 views

Hooking in to plugins

I'm working on a plugin that would ideally be able to do things when a user does something through a different plugin. I can add custom hooks in those plugins but obviously this wouldn't work well ...
10
votes
4answers
3k views

Is there a StackExchange-like voting plugin for Wordpress? [closed]

The Vote it up plugin is nice but once you vote something you can't undo. Is there a voting plugin which is similar to the one you find here at StackExchange? (You can undo your vote and vote ...
10
votes
3answers
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 ...
9
votes
3answers
14k views

How To Activate Plugins via Code?

If possible, how can installed plugins (meaning the files have been placed in wp-content/plugins directory) be activated from other plugins?
9
votes
5answers
20k views

How to translate a plugin via .po .mo?

I want to translate this plugin. This plugin already has translations to some languages, and it has .pot file for adding new languages (as far as I understood from description). Although I never had ...
9
votes
3answers
1k views

How to create custom message on plugin update

I saw this message today when accessing my plugin page: So, how do I create this if I want to update my own plugins that's hosted on wordpress?
9
votes
2answers
17k views

Get Product id from order id in Woocommerce [closed]

I am having trouble with Woocommerce product details and order details relationship. I'm not able to find the product ID of a related order ID on the View Orders page of the Woocommerce theme. I ...
9
votes
1answer
152 views

How MUST the directory for a plugin be structured?

I get the basic plugin concept. I've read the Codex article on Writing a Plugin That article talks about the "main plugin file". How does Wordpress determine "the main plugin file" ? Q1: Is it ...
9
votes
2answers
335 views

Alter how often WordPress Auto-Updates Plugins

From my understanding of how WordPress updates core and plugins is that every 12 hours it goes out and looks for updates. When does that time get set? 12 hours from initial installation? I ask this ...
9
votes
6answers
333 views

What plugins do you commonly install on a fresh WordPress install?

I'm looking at finding out what plugins others install most of the time on a fresh WordPress install; the plugins that add value to pretty much any website that is running WordPress. My list of ...
9
votes
1answer
185 views

Does the number of downloads displayed for a plug-in in the WordPress.org plug-in directory include automatic updates?

I'm wondering how the number of downloads displayed in the plugin-directory correlates to the number of actual websites using the plug-in. I realise some people will download and never install and ...
8
votes
3answers
26k views

How do I get WooCommerce to automatically recreate pages? [closed]

I had to uninstall WooCommerce plugin (I deleted the tables it created as well) and now I reinstalled the plugin and I doesn't automatically recreate the WooCommerce Pages. Am I stuck having to ...
8
votes
8answers
11k views

WooCommerce store with ~30,000 products [closed]

I'm investigating WooCommerce as a potential e-commerce solution, however my immediate concern (which I haven't been able to find information on) is the number of products. The proposed store needs ...
8
votes
2answers
6k views

List all sidebar names?

I'm listing all sidebars like that: global $wp_registered_sidebars; echo '<pre>'; print_r($wp_registered_sidebars); echo '</pre>' So I'm getting something like: Array ( ...
8
votes
8answers
12k views

Is there a way (plugin?) to restrict a user to being able to edit just one page?

We use wordpress like a CMS and would very much like to allow users to have a "homepage". Ideally they'd be prevented from mucking up the whole site. Is there a simple way to limit users editing ...
8
votes
5answers
24k views

How to detect WP plugins used on a site

Is it at all possible to detect the list of plugins used on a WP site. Also, beyond my initial hunch, how can confirm for fact that a blog is indeed powered by WP?
8
votes
4answers
2k views

Is there a WordPress plugin that registers a plugin file as a custom page template?

I need to create a plugin that makes custom page templates available in wp-admin. I'm wondering if someone has tackled this already, as it seems like a pretty typical process?
8
votes
4answers
1k views

Security and .htaccess

About a month ago I started a WordPress blog on a hosted server related to a hobby. So, I am new to this at present. Since I'm concerned about security, one thing I did was to install the plugin WP ...
8
votes
2answers
4k views

How to Remove Certain Screen Options and Meta Boxes from add/edit post type?

Now, when you add or edit a particular post within your desired post type, there are more screen options as well. Although, these Screen Options are showing/hiding meta boxes. I would like to be able ...
8
votes
6answers
13k views

Enabling free shipping on Woo Commerce by specific items [closed]

I would like to know if it is possible to enable free shipping with Woo Commerce only if certain items (or items of certain categories / shipping classes) are included in the cart. The Free Shipping ...
8
votes
2answers
2k views

Why activate_plugin is not working in register_activation_hook

I am trying to activate second plugin automatically while activating first plugin. register_activation_hook(__FILE__, 'example_activation' ); function example_activation() { ...
8
votes
1answer
3k views

Making my plugin multi-site compatible

I want my plugin to be installed on each blog and create database tables per blog. I have this code: register_activation_hook( __FILE__, 'install1' ); function install1() { global $wpdb; if ...
8
votes
5answers
2k views

Syntax highlighting for post/page editor [closed]

Anyone know of a plugin that adds syntax highlighting to the post/page HTML editor? Thanks-
8
votes
1answer
1k views

Registering Class methods as hook callbacks

I'm not sure if I have done this correctly. As I understand it: if I have a class foo and a static method bar I can register that as the callback by passing the array array("foo","bar") as the ...
8
votes
3answers
174 views

Plugin upgrading: Widget settings

I have tried doing some research on this but haven't found anything solid yet. I have a plugin I am working on and between the last version and the new version we made some updates to the widget that ...
8
votes
1answer
308 views

WP_User_Query and non-unique usermeta data

We have an issue with a WP plugin that we wrote and maintain - Export User Data A user has reported an issue that non-unique user meta data records are not being returned correctly - here In the ...
8
votes
3answers
2k views

How can I allow commas in tag names?

I want to allow commas in tag names? For example, "hello, world" or "portland, or" but Wordpress keeps separating them. I can do it from the categories page: And it shows up fine. But anything ...
8
votes
2answers
432 views

How to get a variable number of posts per post type on the main loop?

I'm looking for a way to balance the content at the homepage of my blog: the blog has a few post types like Poscasts, Videos and Blog and I'd like to have let's say 10 Posts on the homepage, but I'd ...
8
votes
2answers
319 views

Plugin for editing options on multisite?

does anyone know of a plugin for mass editing of settings on a multisite installation? Something like Plugin Commander for Settings?
7
votes
2answers
25k views

How to customise the output of the WP image gallery shortcode from a plugin?

We're building a plugin that displays posts, and we also want to display the image gallery when it is used in a post. However, we need to limit the number of photos displayed? Is that possible?
7
votes
3answers
7k views

How to catch/what to do with a WP Error Object

I am running some of the WP functions directly inside a plugin, including wp_insert_post(), if something goes wrong, this returns a WP Error object, what is the correct method to catch this error? ...
7
votes
4answers
2k views

dealing with large HTML output via plugin code

I recently wrote my first WP plugin that adds a shortcode for embedding a custom jquery image gallery into posts. It's primarily just dumps a good chunk of HTML into the post, along with javascript ...
7
votes
6answers
1k views

What are the best practices for updating?

Don't want to do anything to take down my blog. Here are some upgrade-related questions: How often should Wordpress be updated? What is the best way to do it? How to know if there is a problem with ...
7
votes
3answers
4k views

Are there any hooks that alter the 404 logic?

Provided you have a 404 page defined in your theme, Wordpress will display a 404 page if "tag" is defined in $wp_query->query_vars, and there are no posts matching that tag. I'm writing a plugin that ...
7
votes
4answers
7k views

What is difference between get_bloginfo('url') and get_site_url()?

I am developing a plugin. I want to know difference between get_bloginfo('url'); and get_site_url(); I got same output, then what's the difference?
7
votes
2answers
18k views

How to customize woocommerce related products? [closed]

I have the following lines of code in my website that will display the related products at the bottom of my single product page in WooCommerce... functions.php: // display upsells and related ...
7
votes
1answer
3k views

Creating a plugin with dependencies

I am trying to extend the functionality of another plugin. I need to get data from it into an array to use in a different manner than the original plugin. (In this case, WPMUDev Categories and ...
7
votes
4answers
2k views

How can I delete orphan keys in WordPress database tables?

In particular in table wp_options. After almost 2 years of blog production it seems increased a lot, and I don't know how many crap is in there. Do you know a plugin that works with WordPress 3.0 or ...
7
votes
2answers
174 views

What is right way to go about adding functionality to a published WordPress plugin?

So I looked all over to try and find some kind of rules, or at least some common-courtesy guidelines, concerning this issue and couldn't find anything. Essentially I'm wondering what I should do when ...
7
votes
2answers
1k views

wp.media update options and force render on uploader

Elliot here from the "Advanced Custom Fields" plugin. I'm working on integrating the new WP 3.5 uploader into the ACF plugin and can't find much documentation about the new uploader at all! Creating ...
7
votes
1answer
172 views

Shared functionality in plugins and themes

I recently started to develop plugins and themes and I found that I need to use several functions of on both. Sometime I think about to check if function / class exist before declared as said on this ...
7
votes
3answers
493 views

Plugin Development: WPMU or WP?

I was thinking, what kind of issues might I face if I port a plugin from WPMU to WP or vice versa. Say I developed a plugin from scratch and wanted that plugin to be compatible with both, should I ...
7
votes
2answers
144 views

How to customize a plugin whilst maintaining ability to upgrade

I am currently working on a major update to one of my WordPress plugins. The plugin lets the user choose from several available skins. Quite often I get asked to create a custom skin. To prevent this ...
7
votes
3answers
1k views

How would you require and automatically download dependent plugins?

Was wondering if there was a class or programming technique that would allow me to check for the installation and activation of a particular plugin and if said plugin were not installed, to have it ...
7
votes
1answer
2k views

what is the correct way to update a plugin via tortoise svn to the repository?

I'm embarrassed to say that I am a bit clueless on the procedure used to update a plugin via tortoise svn even though my plugin has been on the repository for years and had over 300,000 downloads! ...
7
votes
1answer
68 views

Wordpress plugin archive

I need to find an archive of some Wordpress plugins. Previous webmaster of the site installed some plugins and then made modifications to some of them. He did not document these modifications in any ...