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

$wpdb->prepare is not working like mysql_real_escape_string

I'm working on a WordPress plugin and recently I have planned to migrate from SQL to $wpdb. I'm using a method called $wpdb->prepare instead of mysql_real_escape_string but it does not work. Here ...
5
votes
3answers
839 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 ...
0
votes
0answers
8 views

What's wrong with this code? (TineMCE)

I'm trying to make a button that when it clicked, it wrap some text with shortcodes. Everything went good and I did this button, but now, I want to go to the next step which is to make the button a ...
1
vote
0answers
32 views

How to make own crop image function for WordPress plugin

I am working on a plugin, in plugin i create an upload meta fields for images to upload one or more images. Its working perfectly and in plugin settings i gave options to users that they set images ...
0
votes
3answers
387 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 ...
0
votes
0answers
17 views

Gravityform + Custom Post Types Action Hooks?

I'm using gravity forms as well as the gravity forms + custom post types plugin for a job board. Job are added through the gravity form, then the plugin converts them to a custom post type. Jobs are ...
4
votes
3answers
163 views

Using Docker for WordPress development

I am getting started with Docker and I'm still new to professional WordPress development practices. I would like to set up a Docker development environment (on my Mac) so that I can do custom ...
2
votes
1answer
1k views

get_template_part from plugin

This is default get_template_part function inside WordPress: function get_template_part( $slug, $name = null ) { do_action( "get_template_part_{$slug}", $slug, $name ); $templates = array(); ...
0
votes
1answer
22 views

Types plugin custom post add_action hooks

I'm using the wp-types plugin to create a custom post type. I'm developing my own plugin which I need to fire whenever a post of my custom post type is updated. Right now add_action( 'save_post', ...
1
vote
1answer
89 views

Is there an action like 'after_register_custom_post_type'?

I'm writing a small plugin for Visual Composer. I need to list all custom post types but I don't know when to call the query to fetch all post types. My plugin gets initialized by after_setup_theme, ...
0
votes
0answers
11 views

load_plugin_textdomain doestn't work with add_action plugins_loaded

I am trying to load localization for my plugin. There is directory called languages in my plugin folder with .po and .mo files inside of it. I have the following code in the plugin main file: ...
0
votes
1answer
30 views

Wordpress custom post action hook

I'm working on a plugin for wordpress that I would like to fire every time a custom post of the type 'job' is posted, published, edited, trashed, untrashed, etc. (basically whenever there is an update ...
0
votes
1answer
3k views

Auto gallery from folder contents

I want to create a WordPress shortcode that will add an automated gallery of the contents in a folder. I am currently trying to implement this in a site that publishes 12 annual magazine issues, so as ...
0
votes
0answers
28 views

Prevent TinyMCE from stripping html comments?

I'm working on a plugin that adds <picture> element support to a site using picturefill.js to polyfill it in - as part of it I'm allowing the picture element html to exist in the editor content. ...
0
votes
0answers
8 views

check server config prior to plugin install

Say I wanted to make it so that a plugin couldn't be installed or activated if the server didn't have a requisite PHP extension installed (eg. libpdf or whatever). How might I do this? Is it ...
0
votes
3answers
656 views

How to store accumulate multiple option values in a single array using Options_API

I have created an option array that stores a series of options, along with their values. The problem is that I want to ACCUMULATE these options and store them in the options database. Meaning I would ...
0
votes
0answers
6 views

Transition Post Status Causes Menu Not to Save

The following code is in a plugin I'm developing. The code works and xenword_new_post is fired when a WP post is published. The article is updated by xenword_edit_post correctly when a WP post is ...
2
votes
2answers
348 views

Get image URL from media library in input

On wp-admin/post.php?post=447&action=edit for example I have a link and an input. The link appears as follows: <a href="#" class="button insert-media add_media" data-editor="tj_image_url" ...
8
votes
3answers
2k 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 ...
0
votes
1answer
12 views

Can a plugin differentiate syndication feeds from actual site views?

Is there anything in the WordPress API that I can use in a plugin to detect whether the current request to WordPress is a pull of the syndication feed -- as opposed to an actual view of the web-site? ...
0
votes
2answers
21 views

Create a free scripts and styles template within a plugin

Let me explain what Im trying to do. Im creating a plugin that will have a main page like a dashboard that will be used to manage the public facing side of the plugin. Just think like a separate app ...
0
votes
1answer
1k views

using wp_footer hook in a plugin

I'm using the wp_footer hook into the plugin and it doesn't work, but when I copy the code to the "functions.php" file of the active theme it does work, what is the possible problem in this situation ...
0
votes
0answers
6 views

Show h1 intro, while outside my shortcode output

How I can add my h1 heading out ?, but not from inside the loop. Each output has a <div class="relacional"> but I want to have a h1 that falls outside the loo and that above all <div ...
0
votes
0answers
13 views

Options not getting saved in my plugin, more over returns an error

I am trying to code this plugin, but In the options page when I try to save the values, it is not getting saved. Moreover it is giving me this error: http://prntscr.com/72jg4e Can somebody please help ...
0
votes
0answers
10 views

Using remote data in post/pages/widgets in Wordpress custom plugin by jSON

I have a URL like this: http://examplesite.com/manage/access?id=22&access_key=12345678 This is a jSON file. I want to create custom Wordpress plugin and put this access key in the plugin. When I ...
0
votes
0answers
14 views

No file when adding media directly to a post

I am working on a plugin to do some processing of uploaded images. The code below works fine when I upload an image using the media library. However, when I try to upload media directly into a post ...
0
votes
0answers
29 views

Editing a built plugin: How to activate it only on a single post page

I'm working on an old version of wordpress 3.9.5. I Installed a Pintrest plugin "Pinterest Pin It Button On Image Hover And Post" - which just pops-up a share button for pintrest whenever you hover ...
-1
votes
0answers
19 views

How to remove Buy Now button in woocommerce caro

I wanted to make an online catalog of my products . I recently tried woocommerce and I tried the woocommerce carousel. Everything worked fine except that there is a buy now button appearing in each ...
1
vote
1answer
30 views

WordPress template_include filter not working properly

I am working on a plugin. The plugin make custom post type "product". First i use template_redirect action for redirection to single and category pages. Here is my template_redirect code: ...
0
votes
1answer
10 views

Add a description/hint field in the admin page of a plugin

I made a plugin and now I'm making an admin page for it. I know how to properly add a field in an admin page but do you know how I can add an description/hint field like this (grey text)? Thanks
0
votes
0answers
12 views

Use URI to query database and display info in main page

I am sorry if this question has been asked before, but I haven't been able to find a potential solution to my problem. I developed a custom plugin, which has a custom table (very simple, 4 fields, ...
0
votes
1answer
648 views

Uploaded image not appearing in custom post type

I am writing a plugin which should allow users to create a custom post type called reseller and attach an image. The image is being uploaded to the uploads folder and appears in the media library with ...
1
vote
0answers
31 views

How to use update and delete query in wordpress

First i write manually update, delete, insert and select query and execute data with mysql_query function Like this: Select query $prefix = $wpdb->prefix; $postSql = "SELECT DISTINCT post_id ...
0
votes
2answers
1k views

How to append new form elements in “Add New” form of Users in Wordpress admin panel?

I'm developing a WordPress plugin and I want to append some extra form fields in add new form of Users section inside admin panel without editing core files. Can somebody help me in achieving this.
0
votes
0answers
36 views

Add a sidebar for menu item?

I want to modify the WordPress navigation menu. I have added a custom checkbox in the menu items custommenu. If that is enabled, then I want to remove the submenu items for that item and include a ...
0
votes
1answer
475 views

wp_insert_user keeps echoing values

This is bugging the heck out of me. Essentially I've narrowed the issue down to one line of code: $user_id = wp_insert_user ($userdata); From what I can tell nothing should be echoed here, but I ...
0
votes
1answer
717 views

Create an user on external database

I have wordpress site and a project management system from codecanyon. Here is the link I have disabled registration for users in project managment system, only login is enabled. I need to make users ...
0
votes
0answers
36 views

Using Facebook PHP SDK with Wordpress

I'm using the Facebook SDK from here. I've put it all in a class like below: <?php use Facebook\FacebookRedirectLoginHelper; use Facebook\FacebookSession; use Facebook\FacebookRequest; class ...
0
votes
1answer
106 views

Custom entity search and display

I am developing a custom plugin that adds a new product entity with its own tables to the database. I would like to perform custom queries on those products through a custom search form -the classic ...
2
votes
2answers
494 views

Multiple files in wordpress plugin

I'm trying to write a plugin with multi files. I'm sure I did it before without a problem, but now I have the problem in the subject. In the main plugin file I have included a file name - ...
0
votes
1answer
13 views

Associate custom categories to different user IDs

I am trying to associate custom categories created by different users to their userIDs. I did that with custom posts and custom pages, but I really have no idea on how I can do that with the custom ...
2
votes
2answers
127 views

How to create collections that are edited in admin?

I'm not sure what this feature is called, but I've seen examples of this before. Lets say, on my site I want additional collections of things (besides blog posts) that have their own sections in the ...
0
votes
0answers
16 views

3rd Party Plugin dependency - how to correctly load classes

I'm trying to understand how this block of code in the an existing wordpress plugin which depends on a third party events-manager plugin works. I understand that the 'plugins_loaded' action hook is ...
0
votes
1answer
16 views

shortcode which is introduced into entry the blog, and appears in side bar

I have the following shortcode plugin, it works perfectly, nothing more I want to put you in the blog and appear in the sidebar, how I can accomplish this? I want not put a widget in the sidebar, ...
0
votes
2answers
130 views

Looking for Hook that is fired after a plugin or wp upgrade is installed/updated

I'm trying to write some code to sms me whenever someone updates/installs a plugin, or updates the WP core, but I can't seem to find a hook that gets fired when this happens. Does anyone know if there ...
0
votes
0answers
17 views

Replace upload system/Override wp_handle_upload

I am going to be running a WP site on Heroku, and none of the current solutions for the media library fit my needs. There is a system for Amazon S3 (not using because paid), and a mapping system for ...
0
votes
1answer
95 views

How to insert HTML/CSS/JS into my iframe plugin?

I currently have an iframe plugin that displays on a WordPress page by shortcode. Currently I have been displaying websites in my iframes "src" but I recently came across an issue to display my very ...
0
votes
2answers
32 views

How to Show Author image and url in WordPress plugin directory? [closed]

I just added a plugin(My-auction-creator) in to WordPress Plugin directory. But sadly when I open the plugin URL the author image is not showing nor the url is linked. So anyone can help me to show ...
0
votes
0answers
20 views

Set options outside of the admin panel

I would like to update my plugin options outside of the options page. I have built a secure hub where only users with the capability 'access-hub' can access it. I would like to let users update my ...
0
votes
0answers
20 views

Is there a way to check PHP version on the hosting pre plugin activation? [duplicate]

Our plugin works on PHP 5.3+ only and we are having instances when users install our plugin on PHP 5.2 and receive an unhelpful message like "Parse error: ...". Is there a way to somehow tell ...