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)

0
votes
1answer
101 views

How to include a file using get_template_part() in a plugin?

A very simple question may be, but I'm struggling. In theme development, I worked with get_template_part() many times, and I understand its basics. But when I's developing a plugin, I wondered using ...
-1
votes
2answers
920 views

Integrating WordPress Content into a jQuery Slider

I have a pretty basic 'featured-list - image slider' implemented above my content in my custom WordPress theme. How do I integrate WordPress content into the slider so that the slide content is pulled ...
6
votes
3answers
4k views

Getting Path To Uploaded Attachment Image After Upload

After you have uploaded an attachment in Wordpress using the media upload screen, is there a hook or filter I can run after the image has been uploaded where I can get the path to the uploaded image ...
4
votes
4answers
344 views

Where is it better to start learning how to develop for Wordpress?

I have already read this question and answer to it ( Where do I start from ). So I have slightly different question. If I basicaly have no knowledge of how the WordPress code is structured and I have ...
4
votes
2answers
689 views

How can I make it so the Add New Post page has Visibility set to Private by default?

I'm trying to create a plugin that alters the Add New Post page so the Visibility field says "Private" by default: Status: Draft Visibility: **Private** Publish immediately [Publish] ...as opposed ...
3
votes
1answer
130 views

Using wp_cron with custom time interval and the register activation hook

Scenario 1: fails Adding a cron task wp_schedule_event with a custom interval on plugin activation using register_activation_hook outside the class definition fails to work because the custom ...
2
votes
1answer
2k views

Creating a custom public user page

I'd like to develop a plugin that allows me to have custom user pages. I really like the way the author archive template handles the URL: /author/username. I don't want to rewrite the author_base as ...
1
vote
1answer
1k views

Save selected item from dropdown menu in a meta box as a metadata value for a custom post type

I have been beating my brains on this one for days now and my Google-fu is failing me. I have created a custom meta box with a dropdown menu that lists all of the terms from a custom taxonomy. What I ...
1
vote
1answer
43 views

Including file or library from other plugin

I'm creating a plugin I would like to use from other different plugins. This plugin declares classes and functions. So, I am thinking about the best way to include, from one plugin, a php file present ...
1
vote
1answer
1k views

Fatal error: Call to undefined function wp_mail()

I am using a plugin wordpress-simple-paypal-shopping-cart for my cart requirement. I am trying to send an email through this plugin when some payment is made by using IPN. My code : $invoiceProducts ...
1
vote
1answer
105 views

How to prevent specific plugin files or subfolders from appearing under “plugin files” listing

I have a folder inside my plugin that's used to store cached data for the application. There's no need for the user to edit these files so I'd like to remove this folder's files from appearing in the ...
1
vote
1answer
410 views

Replacing WordPress menu functionality with a plugin

I asked this earlier on StackOverflow.com before realizing there was a StackExchange specifically for WordPress. Here is the link to the old question (for moderator deletion): ...
1
vote
2answers
473 views

Install widget on plugin activation

Anyone know any resources to help me install my widget when my plugin is activated?
1
vote
1answer
208 views

Can I add pages to my custom menu via script?

My theme has a custom menu assignment... function my_register_my_menus() { register_nav_menus( array('header-menu' => __( 'Custom Header Menu' ) ) ); } ...and I'm creating an "installer" ...
1
vote
1answer
2k views

Current class on admin menu using add_submenu_page()

I am working on creating an administration menu within WordPress for a plugin. I have successfully registered the menu using add_menu_page() and it shows in the sidebar as expected. I have also added ...
0
votes
1answer
38 views

Checking for existence of a page by title?

I'm currently working on a plugin, and I essentially want to check if a certain page has been created. Essentially, I want to do something like this: if (file_exists($file)) { $exists = ...
0
votes
2answers
95 views

I am using multi image metabox plugin but I did get how to display the images in templete?

please help me... here is plugin url http://wordpress.org/plugins/multi-image-metabox/ I am using this plugin but after uploading images. I need to get those images on template... code to display ...
0
votes
1answer
608 views

How to create custom home page via plugin?

I want to code a plug-in that creates new custom home page. Note that I have never coded any plug-in before. 1) After activation of plug-in user needs to go to the options of the plug-in and set up ...
0
votes
1answer
192 views

Prevent multiple counts by same user - WP PostViews plugin

I am using WP Post Views plugin to display the post number of views. To do so, I use: <?php if(function_exists('the_views')) { the_views(); } ?> The problem is: The plugin increments the ...
0
votes
1answer
87 views

Determine which template-{slug}.php is being loaded

I am trying to make a personal plugin that does specific things based on what is loaded. In this example, in my action method I want to perform one function if the currently loading page is using the ...
0
votes
1answer
301 views

Can Not Redirect from Plugin-Registered Admin Page

I am doing the following in my plugin: Register a custom admin page and in the callback function (the last parameter of add_submenu_page) Redirect to another page However, when I open the custom ...
0
votes
1answer
94 views

Getting a WordPress Debug Strategy

I have been reading up on debugging. I watched Chip Bennett's video on wordpress.tv and was inspired to take debugging seriously. What I have found in my reading up though has confused me a bit. I ...
0
votes
1answer
125 views

Why isn't the Settings API designed to work for plugins using custom admin menus? [duplicate]

Possible Duplicate: How should one implement add_settings_error on custom menu pages? The Settings API offers all sorts of labour saving features and future proof code. I find it really odd ...
-1
votes
1answer
255 views

how to search through plugin in wordpress cimy-user-extra-fields?

I have a plugin clalled - Cimy User Extra Fields. I need to search the content through this plugin. This plugin is in WordPress, and all the content are stored in the database also, like industry, ...
27
votes
3answers
3k 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 ...
22
votes
2answers
5k views

Autoloading & Namespaces in WordPress Plugins & Themes: Can it Work?

Has anyone used autoloading and/or PHP namespaces within a plugin or theme? Thoughts on using them? Any harm? Pitfalls? Note: namespaces are PHP 5.3+ only. Assume, for this question, that you know ...
7
votes
3answers
256 views

Getting a peer review for my new plugin?

What is the best way to get an experienced WordPress developer take a look at my plugin and give constructive criticisms? I have written code to solve some of my questions on this site, and I think ...
12
votes
4answers
353 views

Automatically determine minimum WordPress version required for a plugin?

When developing a plugin, is there a way to automatically determine the minimum version of WordPress that's required to run it? I want to make sure that the Requires header is accurate, but manually ...
9
votes
5answers
2k views

How can I add an option to the Page Template list from a Plugin?

I've been looking around for the past couple hours for a way to create a custom page template from within a plugin but haven't had any luck yet. What I am specifically trying to do is add an option ...
5
votes
1answer
3k views

How to make a WordPress plugin translation ready?

What is the best way create a plugin that is translation ready? It doesn't have to be translated from the beginning but it has to be easily translatable so fellow developers from different cultures ...
5
votes
3answers
1k views

Changing Plugin Load Order

I'm writing a plugin, bar, which is dependent on another plugin, foo, being activated, and I need the functions from foo to be available when bar loads. Normally plugins are loaded in alphabetical ...
11
votes
3answers
957 views

Unit testing for plugin development

I need to apply unit testing for one of my plugins. I recently re designed it into classes, so unit testing should be easier to apply now. What are some effective strategies to unit test my plugin? I ...
8
votes
3answers
1k views

Should Plugin Folders Include a Blank index.php File?

WordPress itself, in the wp-content folder, includes an empty PHP file which looks like this. <?php // Silence is golden. ?> Should plugins include an empty file like this as well to stop ...
5
votes
3answers
3k views

Passing arguments to a admin menu page callback?

Situation: I'm working on a plugin and I'm developing it as a class, everything worked fine until I run into this situation. I wanted to make things a bit cleaner and tried this.. class MyPlugin { ...
4
votes
3answers
10k views

Get page content using slug

I'm trying to get page content when I only know the slug string. Is there a function for this, or an easy way to do this or is this a case of doing it via SQL? Thanks very much
3
votes
1answer
586 views

How to enable users to down-vote in this simple voting counter (that uses the post meta)?

This simple tutorial teaches you how to make a voting counter using the post's meta data. I would like to know how to add down-votes to this small script (e.g. -1, -2). In the following way: If the ...
2
votes
1answer
2k views

Best Practices for Creating and Handling Forms with Plugins?

I'm writing a plugin that creates and handles a simple form. This has been my approach sofar, but it's turned out to have some major flaws: 1) On plugin activation, create a blank page for the form ...
1
vote
1answer
2k views

Email verification for new users

I would like to implement a plugin that requires new users to reply to an email, to verify their email address, on registration. I am already doing extensive codex research, but I am very new and ...
1
vote
2answers
3k views

Post from front-end with post types, categories and taxonomies

I am now developing a wordpress site that will be something like a directory. People will be able to submit walkthroughs, advanced reviews, as well as cheat codes for games. We were going to make a ...
7
votes
1answer
1k views

Add screen options to custom admin pages

I want to add screen options to my plugin settings page, like the ones that are available in the Dashboard. I tried using the add_option method of the WP_Screen object and found that it supports ...
6
votes
2answers
305 views

How do I improve this admin query snippet to avoid generating duplicate results on non-meta searches?

I've been playing around with code snippets which add meta data to admin searches. The best snippet I've found was written by Stefano on this question. However, it appears to have 1, annoying bug ...
6
votes
3answers
935 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 ...
5
votes
1answer
253 views

Optimize shortcode callbacks

I created a plugin to add some shortcodes in my WordPress site. But I'm a PHP newbie, so I believe it may have some errors or ways to optimize it. It's working fine, and apparently there are no ...
5
votes
3answers
673 views

How do I log plugin (cron) actions?

Is there a recommended way to log (failed) cron actions from your plugin? For example, I have a plugin that synchronizes with an external service every hour. I want to log how much was changed, but ...
4
votes
2answers
666 views

Make Categories and Tags required in admin

Hello i started from Bainternet solution in this post: don't publish custom post type post if a meta data field isn't valid I made a plugin to make categories and tags required. The ...
4
votes
3answers
5k views

add_action hook for completely new post?

publish_post Runs when a post is published, or if it is edited and its status is "published". Action function arguments: post ID. -Plugin API Documentation I've added the publish_post ...
3
votes
2answers
11k views

How to include wp-load.php from any location?

I have a plugin which calls a stand-alone php script (myAjax.php) via a jQuery.ajax() script inside the plugin. I need to place the following code into the myAjax.php file: ...
3
votes
3answers
2k views

Is there a hook for when you switch themes?

I created a plugin but I just came across a bug that I don't really know how to solve. When you activate my plugin, it creates a file in the active theme directory and when you deactivate it, it ...
3
votes
3answers
1k views

Creating two database tables via plugin

I'm working on a voting plugin for my site and I want to create 2 tables: one that stores votes and another that stores voter ips. In Codex it suggests to use an if statement to see if the table has ...
1
vote
4answers
502 views

URLs of plugin resources?

I am trying to add in a script and css file for my plugin into the admin header. Is there a function similar to get_bloginfo('url') that I could use to reference the files correctly without having to ...