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
58 views

Adding Meta box to thrid-party plugin

I am about to write a custom plugin that is intended to »extend« a third party plugin, in this case it is: »EME Events made Easy«. I would like to add a Metabox to the »edit event« screen, from within ...
0
votes
0answers
171 views

Creating custom Insert Media page

I'm writing a plugin, that has the basically the same functionality as Insert Media page in "Add media" popup. The only difference mine has to use web service for browsing media. I already read about ...
0
votes
2answers
148 views

How to edit link for comment count

I have recently installed Disqus on my blog and have a problem with the link in the comment count. On the main page here all the comments counts for each post link to the appropriate URL for the ...
2
votes
2answers
383 views

flush_rewrite_rules() not working on plugin activation

I am experimenting with creating a simple plugin to create a custom post type named project but am having some trouble with the rewrite rules not been flushed on activation. I have the main plugin ...
2
votes
1answer
368 views

Comment `Reply` link doesn't work if comments are loaded from ajax

I am writing a plugin that displays custom home page that is in fact only one post with comments. The first time home page is displayed by the initial call by php. Then user can click a menu button to ...
0
votes
1answer
77 views

Identifying a Page Containing Shortcode at `init`

I am writing a plugin and I am having some difficulty with when to trigger specific functions of the plugin code. /* // Plugin information goes here */ // ***** Area A $GLOBALS['example_class'] = ...
2
votes
1answer
356 views

Using a front controller in a Wordpress plugin, any suggestions?

My idea was to use a front controller in our plugin. has anyone done that already? The responsibilities of the controller should be initiate router class; provide access to objects registry, which ...
0
votes
1answer
54 views

Create “new pages” within the admin section of plugin

Here is my situation, I'm trying to create my first plugin for Wordpress, but I'm having an issue of trying to change the display within the plugin admin page. Here is what I currently have: As ...
5
votes
2answers
6k views

Send user activation email when programmatically creating user

I wondered if someone here might be able to help. Basically, I've created a custom registration form that when validated, inserts a user to the user table. function _new_user($data) { // ...
1
vote
1answer
208 views

Can wp_list_comments output into variable?

Is there any way how to output wp_list_comments() into a variable? Something like $output = wp_list_comments(array('reverse_top_level' => false ), $comments); I am writing a plugin and it would ...
0
votes
4answers
534 views

wp_count_posts on all post types?

I have 5 different custom post types, Is there any way to count all the publish posts regardless of post_type through any inbuilt functions Like wp_count_posts(array('post','books','video')) any ...
1
vote
1answer
379 views

All Users > User List > Update User Meta Field Inline

I am asking user few questions at the time of registration with checkboxes like In Registration form [] I am blah blah [] I am blan blah [] I am blah blah Now user will come for approval in admin ...
0
votes
1answer
153 views

Render content after post title in wp-admin

I want a plugin to place custom content below the post title, and to the right of the permalink. However, I cannot find a specific action reference to hook into. The screenshot demonstrates the ...
0
votes
2answers
2k views

Get plugin directory from a theme

Does anyone know a non-hacky way of getting the plugin directory path from within a theme's functions.php? I've used plugin_dir_path(FILE), but because its called in the theme's functions.php it ...
0
votes
0answers
37 views

Get fields of a widget

I have a widget that has fields, so how can I get these fields in my Metabox. I have tried with this variable $wp_registered_widgets, but I can't get the fields. Is there any solution for my ...
0
votes
1answer
65 views

Toolbar Hidden in a Virtual Page

I am trying to create a virtual page, but my admin toolbar is not showing up. This is how I am creating the virtual page: functions.php add_action('init', function() { ...
0
votes
2answers
114 views

Display Data's metabox in page

I created a metabox has a textarea in page admin, So after validating the data is saved, but it's not displayed in the page (theme) I hope I explain well my problem. here is my code : <?php ...
1
vote
1answer
84 views

Can I use the different settings sections over different pages using the save options group?

I registered one options group with few different options sections. Each section is meant for different page. register_setting( // ...
1
vote
1answer
35 views

Database for development

While building plugins one of my biggest annoyances is that my development machine does not match a real world install. What I mean here is that my databases are lacking. I'll code something thinking ...
0
votes
1answer
222 views

Resources to learn OOP for WordPress plugins, custom post types, etc

In a plugin, I need to create a custom post type and the associated admin menu modifications with a class rather than procedural code. What is the basic skeleton that I need to build off of in order ...
0
votes
0answers
19 views

Errors with paginating custom table [duplicate]

I have this code for a custom table with pagination. But my error is that it is not redirecting to paged_numbers. And additionally, it produces a 404 error. My code is: add_filter( 'the_content', ...
5
votes
1answer
1k views

Why does WordPress add 0 (zero) to an Ajax response?

Unless I end Ajax processing function by exit() or die(), the Ajax function receives desired and correct output but following by 0. Any idea why is that happening? Is that meant to be like that or ...
2
votes
3answers
146 views

Where do I add a new table's name in wpdb?

I've manually setup a new table in the wp-db database. Where do I add the name of this table in the wpdb class or anywhere else? I've noticed that WordPress uses queries like: $user_count = ...
1
vote
1answer
441 views

How to run a external JavaScript file on wp-admin if admin, and other if normal user?

I'm new to WordPress plugins, and I'm trying to load a external JS/jQuery file with some scripts I need. It needs to run in the wp-admin page (not just once when activated). There is a JS file for a ...
0
votes
1answer
937 views

how can i show a google map in custom post type

i m making a plugin in which, custom type posts are used, for the Location Custom type, how can i show a Google map for any location. The Output will be shown as
0
votes
0answers
54 views

make data result from mysql as link

I'm not really a good web programmer but I wanted to try. I want to make my result from database as a link for example I want "click here" as click would redirect to a new page or something. and I ...
1
vote
1answer
34 views

Checking instances of scripts in wp_head

I'm creating a plugin that uses mootools.js. I do not want multiple instances of the script installed on a user's site, if I am able to avoid it. What is the best way to check if mootools.js is ...
0
votes
2answers
261 views

Plugin architecture to pull from API & create dynamic content on WP site?

I am creating a custom plugin that connects to an external API and pulls in data about a company's locations. Currently, the plugin has a shortcode that I put on a "Locations" WordPress page that ...
1
vote
1answer
149 views

TinyMCE Styles Dropdown not adding html tags other than span

I am trying to add h1,h2 .. in the TinyMCE Styles Dropdown with my other html elements. I have tried the following code, but the problem is it only adds styles if I use span as 'block' value. If I ...
0
votes
3answers
475 views

How to make method from plugin available in theme?

Let's say this was in my plugin: class pluginslug_foo { public function bar() { //stuff } } and I wanted to make the method bar available for use outside of the plugin, for ...
1
vote
1answer
286 views

How to add a new plugin page under desired Options page?

Using WordPress Settings API tutorial I created a new custom menu and corresponding sub menus. Each of my menus have a page of its own. I used add_menu_page() and add_submenu_page() for that. (Here is ...
1
vote
1answer
105 views

how to set context in Wordpress for unit testing

I have created a wordpress plugin which converts shortcodes to content based on the entry saved on the dataase: global $wpdb; $post_id = get_the_ID(); $post_content = get_the_content(); ...
1
vote
1answer
620 views

How to use a dedicated template for the Custom Post Type from a plugin?

I'm working through this tutorial on Custom Post Types (in a plugin) wherein the author demonstrates how to force the use of a dedicated template for the Custom Post Type. The author states thus: ...
0
votes
0answers
697 views

Undefined is_user_logged_in() error with Plugin Query code

I'm getting an: Fatal error: Call to undefined function is_user_logged_in() in C:\wamp\www\benracicot\wp-includes\query.php on line 2521 If I remove the $args from WP_Query I get no errors and I ...
1
vote
1answer
3k views

Use of global variables within plugin [closed]

I am creating my first plugin ever and I found my self having to call the same option variables within various parts of the same page therefore I sought for a solution and stumbled upon global ...
2
votes
1answer
103 views

Rearranging Dashboard meta boxes with use of plugin/functions.php

I know how to remove meta boxes from dashboard, also how to add new ones, but is there a method that allows to rearrange them, for example move from side position to normal with use of functions.php ...
1
vote
1answer
278 views

Determine plugin name from within plugin_action_links filter

Is there any way to determine what plugin the plugin_action_links filter is addressing when it processes the filter? I'm trying to add some actions for each plugin on the /wp-admin/plugins.php page. ...
0
votes
0answers
454 views

show Visual form builder in the front end

Iam anew in wordpress . i used this plugin http://wordpress.org/plugins/visual-form-builder/ to build custom pages then i tried to build a custom page called formbuilder.php to use it in the front end ...
0
votes
1answer
36 views

A question of etiquette when forking a plugin? [closed]

I am updating (forking) a WP plugin over on Github - with some functionality on the plugins roadmap - so I know this feature is desired by the developer and will probably be included in their next ...
1
vote
1answer
167 views

Where to call wp_enqueue_script in a plugin with custom template?

I am writing my first plugin and I have this code in the main plugin php to replace home page with custom template add_filter( 'template_include', 'replace_home_page' ); function replace_home_page( ...
0
votes
1answer
41 views

Installing plugins on installation/activation

Is it possible to install extra plugins on certain plugin installation/activation? I tried to install them using: $upgrader = new Plugin_Upgrader(); $upgrader->install(...) But it's not ...
0
votes
0answers
130 views

Show Metabox Images in slideshow instead of static

I am using META BOX plugin from here http://wordpress.org/support/plugin/meta-box. The images which i add in pluupload uploader , these images show up as static images. What i need is to show them in ...
5
votes
1answer
305 views

Completely remove WP_Admin_Bar for specific user roles

How do I hide/remove the admin bar that is displayed when a user with specific role is logged in? I figured I have to do something with remove_menu(), but not exactly what and how. Codex
2
votes
1answer
362 views

Confusion on WP Nonce usage in my Plugin

I created a small plugin where users can set multiple featured image by clicking Add New link from the meta box and remove them as well. The user can use Set featured image link to select featured ...
2
votes
2answers
541 views

How do I print a notice only on certain admin pages?

I'm writing a plugin which would print a notice, but only on the media page. I found the admin_notices and all_admin_notices actions, but these are fired on all admin pages. Is there any way to find ...
0
votes
0answers
39 views

How to add additional field in a table row after creating a table?

I used options for my plugins.But now i have changed to use own table.i created and using things good.Now i would like to add one field that gets value from user and add that much value as field.This ...
1
vote
6answers
227 views

Pages 404 in wordpress

First of all, I am very new to wordpress and know almost nothing about it. When I create the page foo using in wp-admin, I get the message that the page is created. When I click on view page, it ...
0
votes
2answers
83 views

Plugin Not Working After Being Uploaded To Wordpress Plugin Repository

Why my wordpress plugin is not working after I uploaded it to wordpress plugin repository. Is there any requirement of what tool I should use to write it or may be something else? Here is my plugin ...
2
votes
1answer
655 views

save_post hook not triggered in WP v3.6.1

I developed a plugin having a custom metabox that is using the save_post hook to store data. The plugin is 18 months old and is used by thousands of customers, so I'm pretty sure everything is good. ...
0
votes
1answer
25 views

how to request a script more than once in wordpress

Can I ask how I can request a script more than once in wordpress. For example: for($i = 0; $i < 2 ; $i++){ wp_enqueue_script('alerthello.js', 'example.com/example.js'); } I expect the code to ...