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
0answers
34 views

remove_filter right way

What is the right way to remove filter in condition? method 1 public function update_loop($query) { global $wp; if(!$query->is_main_query() || $query->is_admin) return; ...
0
votes
2answers
69 views

How to cancel Wordpress' action/filter when using OOP with anonymous callback

Most of the wordpress plugins I found is functions based, for example, the offical akismet plugin function akismet_init() { global $wpcom_api_key, $akismet_api_host, $akismet_api_port; // ...
0
votes
1answer
26 views

Don't load the theme for a page FROM a plugin EDITED

I'm developing a pseudo admin area for my client and they don't want the theme overlaid on it, rather have their admin area take up 100% of the page. Normally I would add if (!is_page($id)) and be ...
0
votes
1answer
35 views

Calling dynamic_sidebar in plugin gives error

I am trying to call dynamic_sidebar from a plugin page. Whenever I do so, it returns a white page! Any idea why? What I am trying to do is to save the total sidebar output in a transient. I can get ...
0
votes
1answer
70 views

Why tinyMCE.editors doesnt work on tinyMCE

<?php /* Plugin Name: Taggr Plugin URI: http://example.com/wordpress-plugins/my-plugin Description: Premium plugin for image and photo tagging Version: 1.0 Author: Tee Kai Yang Author URI: ...
0
votes
0answers
77 views

Dynamic css for a widget plugin

I have a plugin that creates a widget to show latest posts and I would like to add a dynamic css file to style the post title without using inline styles. So for example i have public function ...
0
votes
1answer
145 views

Mediaelement.js feature doesn't work

I am trying to add new feature to mediaelement.js. Here's one example http://mediaelementjs.com/examples/?name=loop Another example which I am trying to implement now is this- ...
0
votes
0answers
108 views

Custom query not working in plugin admin page

I'm not sure what I am doing wrong, but I cannot use get_post, get_posts or WP_Query in my plugin admin page. I can use get_user_meta, and get_userdata, so I'm a bit confused as to why I cannot use ...
0
votes
2answers
69 views

How to add chunk of php, html, and sql code to variable an append to $content

I am creating a plugin (my first) which allows the site admin to display the most used post tags over the last X number of days. This plugin is an evolution of the WP Development question here - ...
0
votes
1answer
27 views

Adding an external stylesheet to a plugin

I apologize in advance if this question has been asked before. I've created a plugin, and I'm trying to add an external stylesheet, but it's not working. Am I suppose to compress the plugin file and ...
0
votes
1answer
76 views

edit-tags.php in plugin admin menu hides when is the active page

For the plugin I'm building I have added a submenu as a child to a custom main menu item in admin. The submenu page is an edit-tags.php page. This shows up as intended under the main menu item. When ...
0
votes
1answer
158 views

Second select list values are not saved after clicking update

I have a select list in a metabox which value is saved successfully after clicking "Update" when editing post. Of course, the values are custom taxonomies. But i don't know how to add another select ...
0
votes
1answer
52 views

Save data of select list after clicking save

I already have a meta box in the edit post that has a select list with custom taxonomies. But after i save the post the select list returns it value to none, so i don't know how to save the selected ...
1
vote
1answer
61 views

Trying to code a simple plugin, infinite loop?

I am at a standstill. I have checked over my code so many times. The code just shows up about 4 or 5 times on the Settings --> Plugin page and then breaks the browser. I am just trying to make a text ...
0
votes
1answer
77 views

Removed jQuery script from header.php , any problems?

To avoid multiple jQuery calling from my theme and plugins, I removed <script language="javascript" type="text/javascript" src="<?php bloginfo('template_url'); ...
1
vote
1answer
26 views

Howto check version of another plugin and then add a submenu page to it

i'm writing a plugin which requires another plugin. So i have to check first if the other plugin exists in a correct version. If yes i want to add a submenu page to the plugin page but here my code ...
0
votes
1answer
110 views

How to prevent plugins from loading jQuery

I recently downloaded a free plugin from wordpress.I want to remove the plugin from loading jQuery because you experts know that it is already loading from wordpress header.php file. The plugin is ...
0
votes
0answers
29 views

Hierarchy of Subcategories on Permalink

I'm new to Wordpress. My current permalink is set to /%category%/%postname%/ and a "." (dot) in the Category base. My categorys ID are bigger than the subcats IDs. So the URL looks like this: ...
0
votes
0answers
22 views

How to include WP_Widget from another file in main plugin file?

I tried to use the code bellow in my main file: define( 'MYPLUGINNAME_PATH', plugin_dir_path(__FILE__) ); include MYPLUGINNAME_PATH . 'class/class-widget.php'; Then I have a file ...
0
votes
0answers
42 views

wp_next_scheduled() with jQuery Countdown

I'm working with the jQuery Countdown timer for the first time and I wanted to integrate it into my Wordpress site to display the time until the next scheduled cron event. When the countdown has ...
3
votes
1answer
91 views

Get list of scripts / styles and show file which enqueued them

I want to show what scripts and styles have loaded on a page and which plugin / theme / file has added them to the page. We can show all scripts and styles using: <?php global ...
0
votes
2answers
62 views

Jquery was not found on this server

I have two pages, events.php from plugin1 index.php from plugin2. in events.php. I am including jquery for ajax loading <script ...
0
votes
2answers
31 views

How can I modify admin bar only if my plugin is loaded

If I want to always change the admin toolbar at the top of the page it's easy. add_action('admin_bar_menu', 'add_toolbar_items', 100); function add_toolbar_items($admin_bar){ ...
0
votes
1answer
250 views

Ajax +wordpress onClick link redirect to new page and create html content

i have two pages in my wordpress plugin index.php charts.php in index.php i have some content and some link.. <a onclick="show_trend()" >Trend</a> while clicking this link ,i have ...
0
votes
1answer
44 views

See output of a sql query while plugin installation in wordpress

Doing wordpress plugin development, I am creating a table (while installing the plugin) with the following string: $sql = "CREATE TABLE (query skipped)..."; /*someting*/ For example: I have this ...
0
votes
0answers
43 views

How do I add my own custom php page?

I'm making a plugin and I need to include my own public custom page in it. The user must not be able to edit this page and that's why I don't want this to be a regular WordPress post of type 'page' ...
1
vote
1answer
644 views

Wordpress metabox file upload in custom post [duplicate]

I'm relatively new to wordpres development and am stuck at this issue. I have created a custom post type which shows up in the admin menu. I need a metabox in it with a file upload field. The metabox ...
1
vote
1answer
45 views

Plugin options not being saved or created

Having a lot of trouble with this config page. I have followed the documentation (which was sparse) and done a bit of searching for help. My problem is simple, my config options aren't being created ...
2
votes
1answer
144 views

How to prevent loading of all plugin's resources?

Wordpress is loading all client resources of all plugins, not just the plugin of interest. It may make sense to load jqery globally but it makes no sense to load all other plugin's Javascript in a ...
0
votes
0answers
19 views

wp_parse_args not insert it to options

wp_parse_args not inserting default value to options. But its printing results. $options = get_option('my_options'); $defaults = array ( 'logo' => 'http://domain.com/logo.png', ...
1
vote
1answer
59 views

get_query_var not works

I would like to $_GET a parameter in the URL, for that I read I have to use query_vars. First I added the following lines to functions.php: function add_query_vars_filter( $vars ){ $vars[] = ...
0
votes
1answer
54 views

How to work with AJAX and Wordpress?

I'm working on my first plugin. I would like to add a follow button for the posts, so the logged in users can follow the authors. I placed the following lines into functions.php function ...
0
votes
1answer
387 views

How to add an admin notice upon post save/update

I have a post type the uses post_save to take the address from the post-meta and retrieve the lat/lng coordinates from the Google API. I need a way of notifying the user if there was an issue with ...
0
votes
1answer
70 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
0answers
29 views

Tabbed navigation for plugin options using same row in database for all?

I'm trying to use WordPress' native tabbed navigation on my plugin's options page, but I'm having trouble. I've managed to get the options to display, though it displays every plugin option on every ...
0
votes
1answer
50 views

Update own Plugin Repository on Multisite

i have a curios problem what i cannot fix. On the plugin mainfile i defined: add_filter('pre_set_site_transient_update_plugins', array('moreads_update','check_4_updates')); add_filter('plugins_api', ...
0
votes
0answers
12 views

Template redirect inside of plugin not redirecting

I have this inside of my plugin but it's not loading it ... function templateRedirect() { if(is_home()){ echo 'hello'; } } add_action('template_redirect', 'templateRedirect');
0
votes
1answer
63 views

conditionally load javascript & CSS for do_action() calls from plugin

I am developing a plugin and using do_action() instead of shortcodes to display plugin content on the site. The plugin will only be used by me, but I am making the plugin to separate components of ...
0
votes
0answers
463 views

Add async script

I am working on a plugin that has to inject a script on pages (something like RefTagger), which would be easy using wp_enqueue_script, but there are two reasons I cannot do that: the script tag has to ...
1
vote
0answers
30 views

Including a meta box on a plugin page

I want to include the 'Comments' meta box (the one usually seen on the post creation page) on my plugin's admin page. Is there a way to do that? I am aware of how you can use add_meta_box() to add a ...
0
votes
0answers
16 views

search form to query textarea within plugin settings

I have a form, input text and search button, on the front-end of my site, that pops up when users select 'purchase', this all works great. <form action="[not sure what goes here]" > ...
0
votes
1answer
54 views

Get author posts count after excluding a category

I want to display the posts count of each author, but posts that are in some categories should be excluded from the count. I tried doing this with count_user_posts( $user->ID ), but this function ...
0
votes
1answer
47 views

Wordpress postboxes On Tabbed Views and Hiding Registered Pages

Firstly here is a YouTube of me explaining my problem... https://www.youtube.com/watch?v=Nenu1stzLRw I want to be able to use postboxes on tabbed pages. Usually tabbed pages are called views to ...
0
votes
0answers
126 views

Adding Third Post Box Column: postbox-container-3

I've studied plugins that have postbox-container-1 and postbox-container-2 in use. The best implementation of post boxes I have seen is in TablePress Plugin I had to adapt the approach used in ...
0
votes
2answers
144 views

Resize Image without cropping

Currently I’m working on a WordPress plugin and as part of it users can upload Images. What I want to do is that these uploaded images of any size will be resized to 100px by 100px without cropping. ...
1
vote
1answer
86 views

How to load library scripts in admin from plugins in noConflict wrapper?

For my plugin I need to make a meta box for some custom fields in my CPT (xyz), and to organize the fields, I need to implement tabs. And I's taught to load jQuery/JavaScripts using ...
1
vote
1answer
26 views

Read text defined under __()

I am new to WP Plugin development. I have a theme where texts are included inside __() function for translations, like: __('This is text to be translated'); I want to create a plugin which would ...
0
votes
0answers
103 views

Integrating Option Tree in my plugin

I am striving my best to integrate Option Tree plugin in my plugin, but couldn't integrate. Basically, when we want to integrate Option Tree in your Theme, you use below code in your functions.php ...
0
votes
1answer
41 views

WP_NAV_MENU filter targets all menus

Im trying to replace my template's primary menu through a plugin so that I don't have to make changes to the header.php. I found this code in another question answered here in 2011 (Replacing ...
0
votes
0answers
21 views

Backbone is breaking the media uploader

Greets, when using backbone in a plugin of mine the media uploader on the post edit page stops working properly. The uplaod button doesn't work anymore and the drag and drop functionality doesnt ...