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)

-2
votes
1answer
22 views

Getting Plugin directory and url

In one of my theme the path and directory is set by if( !defined('ADMIN_PATH') ) define( 'ADMIN_PATH', get_template_directory() . '/admin/' ); if( !defined('ADMIN_DIR') ) define( 'ADMIN_DIR', ...
0
votes
0answers
26 views

Web System Architecture

We are building a web system in wordpress. I have read some articles on how to architect a wordpress web system. I really liked the one which suggested using loose MVC Pattern. I have read a couple ...
1
vote
3answers
113 views

What are the benefit in adding hook in the init() hook?

I see a lot of plugins using this approach to add a new hook, e.g. add_action('init', function() { add_action('SOME_LATER_HOOK', xxx); add_filter('SOME_LATER_FILTER', yyy); }); Why they don't ...
0
votes
0answers
92 views

using hyperlink in wordpress plugin

Im developing wordpress plugin . I added a plugin to the admin menu . After clicking on the plugin is displayed user login. (I used parameter-magic func from the wrapper function ...
0
votes
1answer
612 views

How to close tinymce inline popup

I have been looking around, but am unable to close the popup programmatically. The following code does not seem to work. tinyMCEPopup.close() TypeError: Cannot read property 'windowManager' of ...
1
vote
2answers
5k views

Wordpress select dropdown list in widget

Ok, I'm developing my own widget and I've a HUGE problem. I don't know how to fetch and eventually save html selects value. Simple example: /* initialize TITLE */ function widget( $args, $instance ...
1
vote
2answers
39 views

add javascript files only when plugin is called?

I'm writing a WP plugin that might be called on any page using a simple function call:getDeck(Deck_id) - and i'd like to add my javascript files on pages where this function is called ONLY, as ...
0
votes
0answers
44 views

WordPress Plugin: Global Update

Hi I want to be able to make a plugin that will check for updates of other plugins that i have made from a single place. In my main plugin file i have include_once( 'class-login-slider-updater.php' ...
1
vote
1answer
23 views

wp_dropdown_roles() to replace option value = code

I'm trying to replace a hardcoded dropdown list of roles in a plugin. Currently this is the code: echo '<select name="xf_user_role_' . $id . '" id="xf_user_role_' . $id . '">'; ?> ...
0
votes
1answer
39 views

Ajax, jQuery and Wordpress

I'm having trouble getting AJAX and jQuery to work with WP, and wondering if someone can point me in the right direction. I have a form, and I want to pass the data from the form to a PHP function, ...
0
votes
1answer
21 views

Remember the meta value with radio buttons

I've created a simple meta box consisting of two radio buttons: yes or no. When they click on the appropriate box, it saves the meta value to the database. However, the post page does not remember it ...
1
vote
1answer
202 views

How to remove plugin-specific custom taxonomy terms when plugin is uninstalled?

I'm trying to write a class that would allow for easy removal of all plugin-related data when the plugin is uninstalled. Specifically, I want it to remove plugin options, custom post type entries, and ...
1
vote
0answers
40 views

Wordpress Custom field Colors

I came across this code and would like to use it in my project. It works fine, but the problem is, I need to change those colors in the array to instead pick transparent images from url since I am ...
0
votes
1answer
35 views

Apache rewrite rules and wordpress problem

I tried to fix my problem by using wordpress rewrite rules but sadly it took me so long I tried this approach. I got it working for one of my simpler problems but now I can't get it to work for my two ...
0
votes
1answer
266 views

How to add a custom activity to Buddypress?

In BuddyPress, I want to add a custom activity type called travel photos. E.g so when you go to your profile, there's another link saying Travel photos. When you click it, it lets you post a new ...
1
vote
1answer
51 views

Common functionality between my own plugins

I read that when creating new post types, creating a settings page, and creating a new taxonomy, you should create a plugin. So I have done that. But I have functionality, which could be generalized, ...
0
votes
1answer
68 views

How to add custom content under plugin row in WordPress admin plugin list?

I'm looking to add a custom message under my plugin in the "Plugins" page, much like the following screenshot: What action or filter should I use? Thank you!
0
votes
1answer
57 views

How to safely sanitize a textarea which takes full HTML input

I'm developing a plugin which enables the user to send HTML emails from within the WordPress admin. How should I sanitize the textarea input? It has to be able to contain the whole range of HTML tags ...
0
votes
1answer
25 views

WP Plugin Running before jQuery

Can somebody please take a look at this, I'm really getting frustrated with it. I'm having problems with jquery and a plugin. I've setup a WP theme here if you would like to preview. I've also got ...
0
votes
0answers
12 views

Problem Display Custom Post On Page

i am new in wordpress and first time i make plugin with help of tutorial i make custom post i need when i add data in custom post display on page but i still didn't find the mistake please suggest, i ...
0
votes
1answer
19 views

Using user_status in conditional with get_users to return existing users

I'm working on a plugin needing to return avatars a specific way. If the user exists in the wp_users table the code is run else a different set of code is run if the user is not in the wp_users table. ...
0
votes
0answers
28 views

What method should I use to store my plugin data (multi level menus with options on each item)

So the background on my plugin - it generates taxonomy/term filters to give you a filtering system similar to what you'd see on NewEgg where you filter your results by category/manufacturer/other ...
2
votes
4answers
2k views

How to change wordpress post title?

How to change just wordpress post title but not menu items. add_filter('the_title', 'wordpress_title'); function wordpress_title(){ return 'New title'; }
0
votes
1answer
23 views

remove all submenus from plugin

Is there a way to un register all submenus at once instead of using the code below? remove_submenu_page('myplugin', 'sub-page-1'); remove_submenu_page('myplugin', 'sub-page-2'); ...
0
votes
2answers
722 views

What is the proper way to get logged in user id in a plugin?

I need to get logged in user id inside my plugin. Is this the proper way? $root = dirname(dirname(dirname(dirname(__FILE__)))); if (file_exists($root.'/wp-load.php')) { ...
-2
votes
1answer
27 views

Why haven't I see plugins using get_file_data to handle retrieving plugin version?

In terms of best practices, I'm curious as to why I haven't seen anyone using get_file_data or get_plugin_data to handle getting a plugin version (for versioning CSS/JS files). Many quality plugins do ...
0
votes
1answer
67 views

How To Remove The Filter That Adds JetPack Related Content To Dom

I am trying to remove the filter in JetPack's Related Posts module that adds the element to the DOM that the module's JavaScript populates with the related posts. Once I remove it, I can achieve my ...
0
votes
1answer
37 views

Why function hooked using object are executing at all time?

I tried to use class and object in plugin. I made a simple function with a shortcode but it is executing the function without pasting the shortcode to any page/post. class example{ function ...
-1
votes
2answers
1k views

How to exclude the particular category from the woocommerce plugin?

add_action( 'pre_get_posts', 'custom_pre_get_posts_query' ); function custom_pre_get_posts_query( $q ) { if ( ! $q->is_main_query() ) return; if ( ! $q->is_post_type_archive() ) return; if ( ! ...
0
votes
0answers
21 views

wp_register_sidebar_widget in loop within a plugin?

I'm trying to dynamically create widgets based on a posts from a post type. The code is as below. This function is pulled from my plugin class: public function initWidgets() { // Config ...
3
votes
1answer
51 views

How to Loop Plugin Option Field Set?

Problem/Background Currently, I'm creating a plugin for a client that will enable them to mark and modify predetermined Google Map polygons (displayed on the site) in the dashboard. I want to let ...
0
votes
1answer
25 views

Odd behaviour with submenu link creation

I'm trying to develop a plugin that needs to add two pages to the dashboard side-bar menu. One of these being a main category. Everything is fine, except for the second submenu item for the settings ...
0
votes
3answers
56 views

wordpress plugins with add-ons

Im wondering if anyone can point me in the direction of how to create a plugin with add-ons. It looks like the approach is first to create a plugin with the core feature, and then write other plugins ...
0
votes
1answer
42 views

Catch own Exceptions

I build some package with my own Exception but when I try to catch a exception I got fatal error: Uncaught exception. This situation is only when method with throw is passed by add_action( 'init', ...
-2
votes
1answer
55 views

Ajax Contact form plugin [closed]

I am facing strange problem .I am building ajax contact form plugin.My problem When I add jquery script in theme footer there is no problem at all everything works fine. But if I add same script from ...
0
votes
2answers
64 views

First and last name fields not filled when using wp_insert_user

I've written a plugin to allow authentication to a WordPress install via an external API. Everything is working except the first and last names are not being set for the new WordPress user created by ...
0
votes
0answers
15 views

Create a Module inside the new pages admin site

I got the following problem: I have a plugin and with this plugin I want to create a module which will be visible if I create a new Pages in the admin section... like in the Picture the "Title Bar ...
0
votes
0answers
42 views

How to show post attachment image

i am going to create a slidershow by post attachment in single.php. i use this code but the result is null. <?php if ( have_posts() ) while ( have_posts() ): the_post(); ...
0
votes
1answer
24 views

Forward an old url rewrite scheme to a new one?

I have the following url rewrite for custom post type: add_rewrite_rule( 'event/([0-9]+)', 'index.php?post_type=event&p=$matches[1]', 'top' ); Due to a site structure change, I'll ...
0
votes
0answers
6 views

how to create plan subscription in plugin so no one can play with the code? [duplicate]

I am confuse about plan subscription development in plugin, because if user download the whole plugin coding file then he/she can change the any of the code in plugin.so how can develop this type of ...
3
votes
1answer
218 views

Determine which theme location a wp_get_nav_menu_items is for

Is there a way to determine which theme placement a menu is for when modifying it with the wp_get_nav_menu_items filter hook? I'd like to only add items to certain menus and I don't want to have to ...
0
votes
0answers
17 views

Saving options for the fields on paginated pages

I am working on a WordPress plugin with some options for the fields which are working fine without pagination. I am kind of new to WordPress plugin development. The problem is I added pagination to ...
0
votes
0answers
20 views

problem with blank page

i have a real big problem with my wordpress website functions.php when i put the following code to achive post view and thumbnail. i'm getting the blank page error which when i publish or update a ...
2
votes
1answer
45 views

Tips for targeting widget dragable for WP Pointer on widgets.php page

I'm updating a widget plugin I wrote called Feature Me and am adding in WordPress pointers for first time users to help them find the widget after installing the plugin. However, I have come across a ...
0
votes
0answers
19 views

dynamically add value inside a variable from shortcode

I'm using a plugin which retrieves comments from the database and then offers the option to filter them by their meta_key and meta_value. Description: The function called by the ...
0
votes
1answer
41 views

What is the use of wp_schedule_event hook?

I want to do a cron(executes function at specific time, like email,db backup etc) job. I searched in wordpress, i got this wp_schedule_event Here they say it will execute job when someone visits ...
2
votes
0answers
105 views

Custom media upload content for inserting custom post shortcode

I’m working on a plugin that creates custom post type “portfolio” along with shortcode to insert in any page or post. The shortcode is: [portfolio option1=“1” option2=“0” option3=“1” ] And it works ...
0
votes
0answers
14 views

Building a plugin: use offset values, save to database, call values on frontpage in loop

I first posted this on StackOverflow, but now I realise that this is probably more suited for this site. Updated 26 Feb. 2014 I already that this question will be quite elaborate, so for everyone ...
3
votes
2answers
880 views

How to disable plugin update notification for a specific plugin in Multisite

How it is possible to disable plugin update check and notification for an custom specific plugin in WP Multisite. I think it is also important, the plugin is usable as single activation in each blog ...
0
votes
1answer
28 views

Set user ID at time of wp_create_user

I'd like to add a new user to the WordPress user table. The code for wp_create_user works fine but it is adding the user incrementally to the next available ID in the user table. Instead, I want to ...