WordPress Plugins allow easy modification, customization, and enhancement to a WordPress blog. Instead of changing the core programming of WordPress, you can add functionality with WordPress Plugins.

learn more… | top users | synonyms (1)

28
votes
4answers
5k views

Where to put my code: plugin or functions.php?

Is there an easy to understand scheme to decide what kind of code belongs to a plugin or the theme’s functions.php? There are many cases and many debates about that topic, mostly because there are ...
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. ...
26
votes
1answer
8k views

A tool to analyze rewrite rules? [closed]

Is there a good tool to analyze my rewrite rules? I always get confused with the regexes and the parameter replacements. I have created something myself and will post it here so others can use it, ...
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?
14
votes
1answer
3k views

Settings API with arrays example

I'm using the Wrox WordPress plugin development book as a primary reference for getting started with a new plugin and I understand all settings can be saved as 1 array but the book does't give an ...
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 ...
1
vote
1answer
2k views

How to Rewrite Wordpress URL for a Plugin

I am trying to build a Wordpress plugin here with a custom user admin area. What I would like to do is when the user adds /edit at the end of the page, it should open a page from my plugin. So for ...
86
votes
37answers
11k views

Objective Best Practices for Plugin Development? [closed]

Starting a community wiki to collect up objective best practices for plugin development. This question was inspired by @EAMann's comments on wp-hackers. The idea is to collaborate on what objective ...
50
votes
27answers
8k views

Software for WordPress Theme and Plugin Development? [closed]

What software do you use for your WordPress related needs? Please state your OS. On windows XP I use: filezilla (FTP) notepad++ (for reading of PHP / CSS files) firebug (a firefox extension to ...
37
votes
6answers
6k views

framework for plugin/theme options panel? [closed]

I found that the longest part of a plugin or theme development is creating the options panel, at least in my case. So i like to know what's your take on that. Do you use a ready made framework or ...
10
votes
2answers
1k views

Symbolic Links on dev box with plugins and stylesheets

I'm using mac os x 10.6 with xampp. http://wp3.1/ is the url to where I have WordPress installed. The physical path is /Users/myUserName/Sites/wp3.1/ I do not install plugins or themes in the ...
5
votes
2answers
2k views

How Do I Use jQuery UI In My Plugin

It's a sad day in the world when I Google something and it returns nothing. I am trying to use the default datepicker (or ANY datepicker at this point) and am unable to because of my lack of ...
7
votes
1answer
1k views

What is the advantage of using wp_mail?

What is the advantage of using wp_mail() over mail(). Codex says they're similar, but they seem to be very similar.
10
votes
2answers
708 views

Strategy On Building Plugin Using Eclipse

Anyone who has experience in building wordpress plugin using eclipse PDT? My situation is: I need to build plugin that extend another plugin (look at it as premium version from another plugin) I ...
1
vote
1answer
674 views

Export data as CSV in back end with proper HTTP headers

I wrote a plugin that displays all products in a woocommerce store in admin settings option, now I want to add a link to download the products as CSV file. The problem is, when I click the link I get ...
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 ...
14
votes
2answers
6k views

Difference Between Filter and Action Hooks?

I have been looking at the plugin API a bit more in depth recently and I was wondering what real differences there were between action and filter hooks. They both are events that receive data as a ...
2
votes
1answer
6k views

Any examples of adding custom fields to the category editor?

I think I'm pretty close to cracking this nut :) I'm trying to add a set of custom fields to the Category editor. Since I'm not dealing with post meta, I believe I'll be writing my custom category ...
1
vote
2answers
444 views

How to use a Must-Use plugin to hide a regular one and to hide itself?

When solving this issue ( Change admin language based on user (in single-site) ), I did a function so that the plugin would auto-hide from all users except one (me:). The flaw is that it only ...
12
votes
4answers
8k views

How do I add CSS options to my plugin without using inline styles?

I recently released a plugin, WP Coda Slider, that uses shortcodes to add a jQuery slider to any post or page. I am adding an options page in the next version and I would like to include some CSS ...
10
votes
1answer
505 views

How to create an API for my plugin?

I have been developing plugins for WordPress, most plugins I have developed use two or three classes, hence not as huge as Buddypress or WooCommerce. I am planning to develop two open source plugins ...
15
votes
2answers
2k views

Enhance Media Manager for Gallery

I would like to enhance the Media Editor, after WordPress 3.5, on the gallery view. I want to add a new select field on the right side and send the selected values to the gallery shortcode. I ...
4
votes
2answers
2k views

Redesigning Custom Post Type “Add New” page

I've been browsing all over google for a solution to this. I'm writing a custom post types plugin for work to log-in visitors that we get. I initially wrote a mock-up without custom post types, then I ...
0
votes
3answers
5k views

Mapping multiple URLs to same page

I just came across this page with almost similar requirements as mine Multiple endpoints to same page i have to achieve same functionality but i also want to pass some parameters to the page where ...
5
votes
1answer
1k views

Load js/css files only on specific admin UI pages

How do I adapt this solution to work with my plugin? (Please see the link). I enqueue my css and js script as follows: function my_plugin_init() { wp_enqueue_script('my_plugin_script', ...
5
votes
2answers
5k views

Quick edit screen customization

Possible Duplicate: How to show custom meta box on "Quick Edit" screen? I'm trying to edit the quick edit screen on my custom post type "visitor" so that I can add some options for my end-users. My ...
6
votes
1answer
426 views

How to create a flexible abstraction for WP_Query?

My question is about php but it involves wordpress as i am creating a plugin. The case is that i have 5 questions, each question have 6 choices and one choice to choose from each. Now the person would ...
2
votes
3answers
6k views

Category listing with thumbnail and description on home page

I really need a comprehensive solution to this, so I'm offering up almost a quarter of my rep in bounty :) I would like to have a plugin that creates a custom category listing on my home page. To do ...
7
votes
3answers
1k views

Is the new WordPress 3.1 admin bar pluggable and how can I extend it?

How can I extend the functions of the WordPress 3.1 admin bar in my plugins? I am looking for specific hooks and filters to use in adding links or other features to the admin bar. A good example ...
9
votes
3answers
2k views

Update widget form after drag-and-drop (WP save bug)

I've posted a bug-report about this a few months ago (on WordPress trac (Widget Instance Form Update Bug)) and I thought I'd try writing about it here too. Maybe someone has a better solution to this ...
7
votes
2answers
1k views

Looking for WordPress System Diagrams

I am looking for WordPress chart/diagram system design. I found only the template hierarchy diagram, but it's only part of the system. source: ...
6
votes
3answers
1k views

How should one implement add_settings_error on custom menu pages?

The Professional WordPress Plugin Development book explains in detail how to properly use the Settings API, and it also demonstrates how to add Menus and Submenus, but unfortunately it doesn't provide ...
4
votes
1answer
2k views

How can I add columns to the post edit listing to show my custom post data?

When you click on "Posts" or "Pages", you get a paged listing of your posts or pages with the following columns: Title | Author | Categories | Tags | Date I have a plugin which gives an SEO score ...
1
vote
2answers
1k views

How to trap “Publish” button to check for meta box validation?

I'm trying to do some form validation on my custom meta box, and I remember somewhere reading about some javascript function to disable/enable the Publish button - except I can't find it. How do I ...
5
votes
2answers
2k views

How to implement bulk actions in my plugin?

I am developing a WordPress plugin. This plugin displays a list of courses. Now I want to implement the bulk actions just like in other plugins. From where I can apply the delete and edit actions to ...
1
vote
2answers
879 views

How to get posts by content?

I found the following codes to get post details. However, it is not possible to get the posts by content. Does any one has any ideas? get_posts() //// get post //// $args = array( 'numberposts' ...
0
votes
1answer
168 views

Trying to avoid including wp-load.php

I am working a plugin where I am trying to connect an HR system with WordPress. There is an XML API on the HR system so I have written the plugin to take the data and put it into a WordPress database ...
0
votes
1answer
439 views

Filters 'request' and 'parse_query' not firing in sites.php nor link-manager.php

I'm trying to make sortable columns in Sites and Links listings admin pages. /wp-admin/network/sites.php and /wp-admin/link-manager.php The problem is the following filters are not firing up in ...
29
votes
9answers
6k views

What process do you use for WordPress development?

I'm interested in how other people develop themes and plugins for WordPress. To me, the in-browser editor in the admin panel just doesn't cut it. Currently, I'm just using an IDE with a PHP plugin ...
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 ...
17
votes
4answers
678 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 ...
13
votes
4answers
6k views

Post meta vs separate database tables

When developing plugins that requires data storage, what's the pros and cons of using one method or another ? The explanation given in the codex is not detailed: Before jumping in with a whole ...
11
votes
7answers
28k views

How to include PHP files in plugins the correct way

My problem is when on the main plugin file i include a php file something like this: include(WP_PLUGIN_URL . '/wordpress-group-buying/ipn/paypal-ipn.php'); //or include_once(WP_PLUGIN_URL . ...
15
votes
4answers
2k views

Plugins in symlinked directories?

When I develop plugins I test them on multiple versions of WordPress by symlinking my plugin directory in the different wp-content directories. This is great since I only have to edit the files once, ...
8
votes
5answers
6k views

Including jQuery and JavaScript files the correct way

I'm having some trouble with this. I'm not sure how to do it the correct way, and I read so many different techniques and ways to do it that I don't know what to make of it. Some questions and ...
3
votes
2answers
3k views

Making a plugin file accessible via url rewrite?

In my WordPress plugin I have a php file that generates some stats about the blog and outputs it as a simple text file. To access WordPress functions I've included this at the top of the file: ...
2
votes
3answers
4k views

What is the recommended way to create plugin administration forms?

I have seen and been using the following technique for adding php scripts to my plugin for handling custom forms in a wordpress plugin. from the quizzin plugin: $code_pages = ...
5
votes
1answer
292 views

Strategies to implement selective loading of plugins

I'm trying to figure out some kind of mechanism to load plugins on demand, depending on the page url, to improve performance. My primary concern is that I have some admin-ajax.php calls that are ...
8
votes
2answers
3k 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 ...
5
votes
2answers
2k views

Get List of Registered Meta Boxes and Removing Them

Is there a function for getting a list of registered Meta Boxes and removing them? I see there is a method for adding, and removing. http://codex.wordpress.org/Function_Reference/remove_meta_box ...