Questions tagged [plugins]

Plugins are tools to extend the functionality of WordPress. This tag should not be used to mark requests for plugin recommendations, which are off-topic per the FAQ.

7
votes
2answers
1k views

My custom made plugin has “a new version available” which links to unrelated plugin

My custom made plugin has "a new version available", also the "view details" link links to a completely unrelated plugin. The plugin files begins with: <?php /* Plugin Name: Simple Contact Form ...
7
votes
3answers
25k views

How to call a plugin function from index.php

I have created a function in my plugin myplugin with the name foo, how to call it from the frontend? e.g. index.php?
7
votes
1answer
17k views

How to add a new product type on woocommerce product types? [closed]

I want to add a new custom "product type" to woocommerce plugin: Tried to duplicate one of currently exist product type files (woocommerce template structure) as a new file (file name and inside ...
7
votes
2answers
11k views

How to declare WooCommerce support in your theme

I have built my own theme, which integrates quite well with WooCommerce, but I want to know how to properly get rid of the notification on top of my theme that said my theme didn't support WooCommerce ...
7
votes
3answers
2k 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 ...
7
votes
4answers
9k views

Create a custom archive page for a custom post type in a plugin

I'm writing a plugin that creates a custom post type named "my_plugin_lesson": $args = array ( 'public' => true, 'has_archive' => true, 'rewrite' => array('slug' => 'lessons', ...
7
votes
2answers
542 views

Is there a standard for naming plugin versions

My business partner and I are developing several plugins and we want to know if there is a standard for the version number of a plugin when there are updates, i.e., version 1.0, version 1.2, version 1....
7
votes
2answers
537 views

When does WordPress.org notify sites of new version?

I have a plugin in the wordpress.org repository and I have updated the plugin to a new version and that new version is reflected in the listing but my sites have the previous version. How long does it ...
7
votes
3answers
3k views

How to disable core and plugin updates

Is there any way to disable core and plugin updates? I am modifying a plugin and bit of WordPress Core (I know its a sin to do so), but can't help it.
7
votes
1answer
16k views

How do I cleanly override a plugin's CSS with a child theme?

I have taken it upon myself to adhere to WordPress conventions so I can have a clean, sexy child theme. However, I am unsure how to proceed on a certain issue. I would like to override the CSS for ...
7
votes
1answer
9k views

How to run Jetpack from localhost? [closed]

I just installed the jetpack plugin on my localhost version of WordPress 4.2.2 however after activating it—when I click on 'Connect to Wordpress.com', I get the following error: Your website needs ...
7
votes
3answers
117k views

WooCommerce shop page to use my custom template [closed]

Before asking the question I want to tell you that I have already asked the question in https://stackoverflow.com/questions/15025213/wordpress-woocommerce-template-file-overiding I am using the ...
7
votes
2answers
2k views

wp.media update options and force render on uploader

Elliot here from the "Advanced Custom Fields" plugin. I'm working on integrating the new WP 3.5 uploader into the ACF plugin and can't find much documentation about the new uploader at all! Creating ...
7
votes
3answers
519 views

Plugin Development: WPMU or WP?

I was thinking, what kind of issues might I face if I port a plugin from WPMU to WP or vice versa. Say I developed a plugin from scratch and wanted that plugin to be compatible with both, should I ...
7
votes
1answer
1k views

Giving Multiple Authors Access to a Plugin's WP.org Repo

A plugin I've released has a collaborator. So I put them into the readme.txt file and they show up on the plugin page and all that. Does doing this automagically give them access to the SVN ...
7
votes
1answer
413 views

Are there procedures to prevent malicious plugin updates?

This is a random thought I've had today. Here's the scenario: I've got a plugin on the WordPress store with 100+ active installs. I recently updated the plugin and pushed the changes to the WordPress ...
7
votes
1answer
2k views

Why “Contact Form 7” doesn't update PHPmailer library?

I realized that popular Wordpress plugin Contact Form 7 uses this library https://github.com/PHPMailer/PHPMailer. When I check source of mail, which has been sended from Contact Form 7, it looks like ...
7
votes
2answers
4k views

WP JSON REST API (Ryan McCue) how to query posts with specific meta data with 'AND' relation?

I use Wp_query class to query my posts. 15 posts are in a template fetched on page load and their filtering works fine. Infinity scroll fetches for other posts using JSON restful services. The filter ...
7
votes
1answer
3k views

difference between add_options and register_setting

I am confused. Want to save data for my plugin. There are people who use add_options and there are others who use register_settings. My question is What is difference between add_options and ...
7
votes
6answers
9k views

Simple rich text editor in Text widget?

I've seen a few plugins that add rich text editing to the default "Text" Widget. However, all of the ones I've tested are either too complicated (or try to do too much) or don't work properly with the ...
7
votes
1answer
75 views

Wordpress plugin archive

I need to find an archive of some Wordpress plugins. Previous webmaster of the site installed some plugins and then made modifications to some of them. He did not document these modifications in any ...
7
votes
1answer
4k views

How to share category taxonomy with custom post type (The Event Calendar plugin)

I have a custom post type 'Events' created by The Event Calendar plugin. It has registered it's own custom taxonomy. Is there a way I can assign the regular WP post categories to some of these events ...
7
votes
3answers
6k views

WordPress sharding: which multi-DB plugin to use?

I've got a WordPress multisite installation that's hosting enough blogs I need to shard the database. I see there are three plugins available to spread WordPress across multiple databases: http://...
7
votes
2answers
778 views

Loading external page template and enqueue script from plugin causes 403 forbidden error

I have a plugin, which creates a panel on following page: mysite.com/wp-content/plugins/myplugin/includes/mypanel.php I want to use this panel on following page mysite.com/mypanel Solution that I ...
7
votes
1answer
4k views

Is it possible to define a template for a custom post type within a plugin independent of the active theme?

I'm writing a plugin to manage data about open-source projects. I developed an object model and have successfully created all custom post types and taxonomies, as well as implemented the correct ...
7
votes
1answer
1k views

Are drop-in plugins a product of design

Were drop-in plugins - when you copy a plugin directly inside a theme - a product of design. Or did the practice arise "organically".
7
votes
2answers
4k views

Deactivate plugin for a specific user group

I would like to deactivate a plugin for a specific user. I'm using the following code inside a the wp-content/plugin-mu plugin file: add_filter( 'option_active_plugins', 'bo_disable_apm_plugin' ); ...
7
votes
2answers
1k views

Looking for a Table of Contents (TOC) plugin for WordPress

I am looking for a simple TOC plugin for WordPress that would create a ToC similar to the one from MediaWiki (Wikipedia). Usually I need this only for big pages and the TOC needs to be generated based ...
7
votes
1answer
738 views

Experiences with adding Nonces to the comment form

I was wondering about the impact nonces would have on the default comment form a theme has. Because Nonces are a built-in feature of WordPress I thought about giving it a try. Does somebody has ...
7
votes
1answer
547 views

Writing test cases for a WordPress Plugin that has translations

What is my aim? I'm looking forward to write test cases for the available translations of a WordPress plugin. My approach: I have setup WordPress using VVV and my testing suite includes PHPUnit and ...
7
votes
1answer
22k views

WooCommerce - How to Add a Custom Field to Cart Items and Cart Totals [closed]

I am using WooCommerce plugin and have the following query: Within the single product page, I have a product where based on certain selections by the buyer, a shipping cost value is calculated, which ...
7
votes
2answers
1k views

Is it possible to “freeze” a WordPress blog?

I'm currently running a 365 photos project and it's based on a WordPress platform. Currently this is very helpful because I can upload the photos easily and manage comments and stuff. Because we are ...
7
votes
3answers
2k views

Help with 4.6. Attachment response object in JSON API plugin

I am a big fan of the JSON API plugin. The developer did a great job and I thank him very much. I am learning how to work with json and jquery and am trying to limit the information I get back from ...
7
votes
1answer
15k views

How to custom crop each image size?

I have over 6 image sizes, Therefore WP cannot satisfy every size with proper cropping as some images get their head cut off and some don't. Is there a plugin that lets me choose the cropping area of ...
7
votes
1answer
835 views

How to moderate posts

I am writing a plugin that will moderate all posts regardless of what level user posted them. It will check the post content and title against a list of words and if any are in the post, I want to put ...
7
votes
1answer
285 views

Development of a Wordpress Search Plugin - Best Practices

Searching for around two days to find an answer to my question, I finally registered for this StackExchange. :) My Question is not simple, so I need to start at the very beginning. But to give you an ...
7
votes
1answer
19k views

How does Woocommerce store variation attributes, and how can they be retrieved per-variation? [closed]

I am trying to pull out a list of product variations from a Woocommerce installation, with their attributes - something like this: product id variationid name color size 5 1234 ...
6
votes
2answers
15k views

how to create child WordPress plugin

I like to create child plugin.. Explanation :- I have one parent plugin named X. This will work independently (like other existing plugins). Now I decided to add some extra features to that plugin ...
6
votes
2answers
6k views

is_plugin_active() returning false on active plugin

So I have the following in an include in my theme file: include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); if ( is_plugin_active( WP_PLUGIN_DIR . '/woocommerce/woocommerce.php' ) ) { $...
6
votes
3answers
47k views

Get the category from an ID of a product?

I have the ID from a product (1345) how can i get the category name of that specific product? I try $post_categories = wp_get_post_categories( $post->ID ); print_r( $post_categories ); but it ...
6
votes
8answers
6k views

WordPress Plugin Development In MVC Architecture, How?

I think, the wordpress plug-in architecture is not MVC. So I want to use/do the MVC architecture in WordPress plug-in development (like cakephp, codeIgniter ). How can I use them in plguin development....
6
votes
5answers
8k views

Removing the “Your backup folder MIGHT be visible to the public” Message Generated by the WP-DBManager Plugin

I upgraded a client's WordPress from 2.8 to 3.0.1 and after upgrading I am now receiving this message in the dashboard: Your backup folder MIGHT be visible to the public To correct this ...
6
votes
3answers
1k views

How to add “Stick this post to the front page” to front end?

I have a baseball related website with multiple authors. I use the "Stick this post to the front page" to denote an "Editor's Pick" on an article. I would like to add a link/button to allow editor to ...
6
votes
1answer
6k views

Publish author posts only with editor approval?

I run a multi author blog and i am looking for a non plugin solution. The default author user role in Wordpress can publish posts without any approvel - look at Role Capabilities Wordpress Codex. ...
6
votes
2answers
27k views

How to roll back a WordPress plugin update?

Yesterday I updated WordPress SEO by Yoast to version 1.2.8.4 from version 1.2.7 and now my admin panel is messed up. I searched through the support forum but the plugin author has not replied to the ...
6
votes
4answers
18k views

How to edit a wordpress plugin without break its update process

I would like to add some additional features/functionality with already available WordPress plugin. Is it possible to carry over my customization while updating the plugin?
6
votes
3answers
22k views

How to Add WYSIWYG Editor (tinyMCE) to plugin options page compatible with Wordpress 3.0 and up?

I'm trying to add tinyMCE instead of textarea for one of my options in my plugin with no luck so far. I tried this : http://www.dbuggr.com/smallwei/add-wysiwyg-editor-tinymce-wordpress-plugin/ and ...
6
votes
3answers
3k 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 ...
6
votes
1answer
6k views

wp_dequeue_style not working

So I am trying to get rid of a font that a plugin is loading on the front end as I am already loading it myself and it loads every style of the font which I don't need. Here is my code: //Remove ...
6
votes
3answers
736 views

Is it a good idea to edit an already existing plugin to add more functionality?

I need to add a relatively small bit of functionality to a Wordpress plugin and I have the option to either edit the plugin directly, or scrap the plugin completely and repurpose PHP code from another ...