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)

220
votes
108answers
100k views

Best Collection of Code for your functions.php file [closed]

Please vote on the question and any answers you find useful by clicking on the UP arrow on the left hand side of the question or answer. As with many others who are now viewing this post, I have been ...
95
votes
9answers
12k views

Tips for using WordPress as a CMS? [closed]

I want to use WordPress as a CMS for a reasonably basic site rather than a blog. I have several pages and at the moment, I don't intend to have a "news" page. While there are ways to make this work, ...
69
votes
12answers
40k views

Adding a Taxonomy Filter to Admin List for a Custom Post Type?

I have created a Custom Post Type called 'listing' and added a Custom Taxonomy called 'businesses'. I would like to add a dropdown list of Businesses to the admin list for the Listings. Here is what ...
49
votes
6answers
3k views

Updates for a private plugin?

If I write a private plugin, is there any way to use the WordPress auto-update mechanism to update it? I want to encapsulate the functionality, but it's specific to my own 5 or so blogs, so it's not ...
43
votes
17answers
3k views

WPSE Plugin Repository: The plugins that came out of WP-Answers

Link your WPSE-Plugins If you answered a question and made a plugin out of your code, than this is your place to share it. The Idea: An old comment from @MikeSchinkel during the beta phase where he ...
40
votes
2answers
24k views

Uninstall, Activate, Deactivate a plugin: typical features & how-to

I'm making a wordpress plugin. What are typical things I should include in the uninstall feature? For example, should I delete any tables I created in the install function? Do I clean up my option ...
35
votes
2answers
3k views

Do deactivated plugins slow down a WordPress site?

Most people are aware that minimizing the number of plugins used is a good way to help keep a WordPress site running fast. However, does that general rule include deactivated plugins?
31
votes
1answer
3k views

What's the preferred method of writing AJAX-enabled plugins?

I'm wondering what the preferred method is for dealing with AJAX calls. Should one use the same plugin php file to process the POST or a separate one? Which is cleaner or safer?
29
votes
13answers
2k views

How do you debug plugins?

I am pretty new to plugin authoring and was having a hard time debuging. I used lots of echo and it is sloppy and ugly. I am sure there is a better way to do this, maybe an IDE with a debugger that ...
27
votes
3answers
4k views

Best way to initiate a class in a WP plugin?

I've created a plugin, and of course being me, I wanted to go with a nice OO approach. Now what I've been doing is to create this class and then just below create an instance of this class: class ...
25
votes
1answer
2k views

Is there a plugin that provides a stackoverflow style editor for wordpress? [closed]

I am tired of the tinymce editor in wordpress and I really love the stackoverflow editor which allows me to write with markdown grammar. So I want to write blog with markdown in wordpress. Now I am ...
24
votes
7answers
2k views

What Plugins Demonstrate Great WP Plugin Development?

I'm going to be tackling my first plugin soon and I'm looking for plugins which you feel are of very high quality, under the hood. Stuff I can use as an example while I design the framework for my ...
24
votes
1answer
1k views

Add multiple plugin directories

The task You can register add additional Themes directories using register_theme_directory() for your WP installation. Sadly core doesn't deliver with the same functionality for plugins. We already ...
23
votes
1answer
14k views

Create custom page templates with plugins?

Is it possible to make custom page templates available from a plugin?
22
votes
1answer
4k views

Passing a parameter to filter and action functions

Is a way to pass my own parameters to the function in add_filter or add_action. For example take a look in the following code: function my_content($content, $my_param) { do something... using ...
20
votes
4answers
1k views

How to implement a customizable free OpenID authentication?

OpenID is a standard commonly used nowadays. I am trying to implement OpenID on my blog, but I have many difficulties. I tried OpenID plugin but it seems to be incompatible with Wordpress 3.0. I ...
19
votes
15answers
566 views

What Features would you Most Like to See Added to WordPress? [closed]

I'm creating a community wiki to ask the following question: What features would you most like to see added to WordPress? This Question Implies a Few Things: It should surface the features ...
18
votes
13answers
1k views

What Are Security Best Practices for WordPress Plugins and Themes? [closed]

As suggested in this question, I am adding this topic as a new question, for community discussion/voting regarding best-practices for Plugin/Theme security. Here is the starting checklist, based on ...
18
votes
2answers
6k views

Between functions.php, widgets and plugins, which is loaded first?

Customer asks if a specific carousel plugin he uses can be widgetized. That means i should create a widget inside functions.php which calls the plugin's function. That means that the plugin's code has ...
18
votes
5answers
1k views

Should all plugins be encapsulated in a Class?

When developing a plugin should the functions be grouped together into a Class to avoid namespace conflicts? Does using classes create performance overheads for PHP? If there is a performance hit, ...
17
votes
4answers
687 views

Who are the most trusted plugin developers? [closed]

Note: Please vote on the question, and any answers you find useful by clicking on the UP arrow on the left hand side of the question or answer. There are so many plugins out there. Whose plugins can ...
17
votes
2answers
2k views

'Global' settings page for multisite plugin

I'm working on a plugin that will be installed in a multisite instance. How do I create a single settings page that is visible at the "Network admin" level only - most of the guides i've seen relate ...
16
votes
9answers
4k views

How to structure a plugin

This isn't a question about how to build a WordPress plugin. Rather, what, if any, guides could be applied to how to put together the file architecture of any plugin. Some other programming languages ...
16
votes
3answers
4k views

How can I stop WordPress from prompting me to enter FTP information when doing updates?

How can I stop WordPress from prompting me to enter FTP information when doing updates?
15
votes
3answers
355 views

How to enable suggested edits?

I like the idea of enabling any user of my website to suggest edits to a page. Much like the edit system on Stack Exchange but different in that anyone should be able to edit, not just registered ...
15
votes
4answers
935 views

Add Google Analytics manually, or use a plug-in?

Our situation is that we only dabble with Wordpress, however one of our Wordpress customers wishes to add Google Analytics to his site. I'm assuming we can do this manually, relatively easily. And ...
14
votes
6answers
424 views

Are Wordpress Plugins essential?

I'm new to WordPress. I recently read an article about how hackers can exploit vulnerabilities in plugins. Various sources such as Google Pagespeed has also disssuaded me from using plugins or at ...
14
votes
2answers
19k views

How to add a shortcode button to the TinyMCE editor?

How to make any plugin icon in wordpress post? The code I want to insert in plugin code and will appear in post bar [wp-admin/post.php]. Like this image: Output: If I click the icon it ...
14
votes
7answers
3k views

Where can I sell WordPress themes and plugins? [closed]

I've been building some WordPress themes and plugins. What are the online marketplaces I can sell them?
14
votes
4answers
2k views

Show a different number of posts per page depending on context (e.g., homepage, search, archive)

In the Reading Settings, there is place to set the number of posts shown that affects the number of posts shown in all contexts. I'd like to show instead a certain number of posts on the homepage, and ...
13
votes
3answers
416 views

What are the common security flaws I need to look for? [closed]

As a wannabe WP plugin developper, what are the main security flaws/holes I should look for? I'm about to create a new plugin with a configuration panel (ie input fields and stuff). What should I be ...
13
votes
3answers
2k views

Where do I put the code snippets I found here or somewhere else on the web?

Many posts here or somewhere else contain code, but they do not say where to put it. Example: I have found this post: How do I turn off 301 redirecting posts (not canonical)? I'm a newbie with PHP. ...
13
votes
2answers
1k views

If I rename a plugin (in its main php file) do I still get update notifications?

I've recently been forced to edit the core files of a plugin. I've updated the title of said plugin to indicate that its been edited. My question is will the plugin still get update notifications? If ...
12
votes
3answers
5k views

Implementing a CrunchBase.com Clone using WordPress?

I wish to create something like CrunchBase.com with WordPress.org (So to have one website that is a "database", and another one, which is a blog, that connects to it). Is it possible? and how? ...
12
votes
5answers
10k views

best way to overide plugin CSS?

currently, I use CSS specificity to override plugin styles. I prefer this to editing the plugin as it makes for less headaches when you update. What would be nice is if my style sheet loaded after ...
12
votes
5answers
425 views

Can a developer adopt a plugin marked as “not updated in over 2 years”?

I have come across a few WordPress plugins on http://wordpress.org/extend/plugins/ with this warning: This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported ...
12
votes
2answers
603 views

I found this in a plugin. What does it do? is it dangerous?

I found this in a plugin. What does it do? is it dangerous? add_action('admin_enqueue_scripts', 'pw_load_scripts'); if (!function_exists('wp__head'){ function wp__head() { ...
12
votes
2answers
620 views

Conditionally enqueue a widget's script/stylesheet in HEAD (only when present on page!)

I've been trying to load scripts and styles for a WordPress widget with the following conditions... The scripts MUST load in the HEAD (else they break). The scripts must ONLY load when the widget ...
12
votes
5answers
3k views

How to include code only on specific pages?

I'm learning about plugins and shortcodes. I noticed that when I activate my plugin its code gets loaded on all of my pages-- even pages that don't have my shortcode. (I don't mean content vs. admin ...
12
votes
3answers
588 views

Delete WordPress plugin Repository

I wanted to create a WP plugin. So I requested and my request was approved by WordPress.org But I don't want to develop that plugin anymore. How can I delete the repository forever or request its ...
11
votes
3answers
6k views

How can I make add_image_size() crop from the top?

I have a series of posts, all with featured images, but I need to be able to customise the crop top right corner. In this instance, I need them to be cropped from top right, but it would be useful to ...
11
votes
2answers
12k views

Woocommerce - Add a product to cart programmatically via JS or PHP [closed]

I am using the Woocommerce plugin to facilitate a small e-commerce part of a site and need to add products to it's cart via some call or function rather than using it's own 'add-to-cart' buttons. By ...
11
votes
3answers
2k views

Open Source Forum for wordpress similar to stackexchange or stackoverflow [closed]

I have to add forum feature in my wordpress blog.I see bbpress but would like to add forum similar to stackexchange or stackoverflow. Please let me know.
10
votes
2answers
10k views

How can I force a file download in the WordPress backend?

I would like to add a "Click to download" button to one of my WordPress plugins, and I'm not sure which hook to use. So far, hooking 'admin_init' to this code seems to work: header("Content-type: ...
10
votes
1answer
5k views

Disable update notification for individual plugins

Is there a way to disable update notifications for specific plugins? As a plugin developer, I have some plugins installed on my personal site using the svn trunk version for testing, but the same ...
10
votes
4answers
626 views

How to maintain W3C standards compliance of a theme

When I wrote a theme, I made sure it was compliant with XHTML 1.1 and CSS 2.1. Then I added plugins and the theme is no longer compliant with XHTMl 1.1. Then I used Google API font in my CSS and it is ...
10
votes
1answer
2k views

How can I use WordPress functions in my stylesheet?

I have my style.php file looking like this. <?php header('Content-Type: text/css');?> #div{ background:<?php echo get_option('bgcolor');?>; } This does not work, but when I do ...
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
1answer
3k views

Custom Post Type Templates from Plugin Folder?

I'd like to offer my custom post type as a Plugin, so that people can use it without touching their theme folder. But custom post type templates -- such as single-movies.php -- reside in the theme ...
10
votes
5answers
388 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 ...