A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

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.

2,767 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
1answer
1k views

How to trace the cause of these PHP notices and warnings for class-wp-query.php?

My WordPress debug.log file is filling up with these PHP notices, alternately with a gap of about 15 minutes and then of several hours… [23-Mar-2018 05:33:00 UTC] PHP Notice: Trying to get property ...
4
votes
1answer
498 views

Let readers suggest edits from the frontend

I'd like to make my articles editable at the front-end for any reader who visits the site. (More like a wiki). I don't really want to trouble them through the registration process. I have no idea how ...
4
votes
4answers
2k views

WooCommerce 'all' orders no longer being displayed - how may I debug/fix

I've just noticed that we seem to have a bug with our store. The 'all' orders selection is showing as empty but the other sub catergories such as completed, on hold and pending etc are there. I'm ...
3
votes
0answers
60 views

How to authenticate custom API endpoint in WooCommerce

I have created custom API, which is working fine, but I am not able to authenticate it, it returns result without checking for keys I have created consumer key and secret key from admin. How to ...
3
votes
1answer
31 views

How can I translate the name of my Plugin for other languages?

How can I translate the name of plugin for other languages? For example: When Wordpress is in pt-BR language, the plugin would be "Meu plugin". If the Wordpress is in en-XX language, the plugin name ...
3
votes
1answer
47 views

Claim Listing functionality - how to send email to users when their claim has been approved or denied

We have a claim listing plugin, it allows items(posts) to be claimed by users. It requires the user to "register" in order to claim that item therefore they have to enter a username and their email. ...
3
votes
1answer
169 views

$wpdb->get_results() does not fetch results with unicode 'WHERE' clause

I've just a simple query to fetch a students records by his name, written in Bengali. $student_rcrd = $wpdb->get_results("SELECT * FROM student WHERE name='আবুল কালাম আজাদ'"); Although my database ...
3
votes
1answer
514 views

admin-ajax returning 400 error when request is made with Fetch API

I'm developing a plugin with an ajax handler. I first coded the ajax request setting up the XHR object. Looks like this: var data = new FormData(); data.append('post_title', 'Hola como'); data....
3
votes
0answers
44 views

Yoast SEO blocking/re-initialising longer running process

I have created a custom plugin, the job of which is to calls an external API to fetch data and fill in some custom tables in WordPress database. This is really a long-running process (maybe over 30 ...
3
votes
1answer
399 views

Find out what is using PHP sessions in WordPress

Is there a way to find out what is using PHP sessions or spawning PHP processes? My Wordpress site gets heavy traffic (3.5 million hits per month). We discovered recently that we had permissions set ...
3
votes
1answer
2k views

Problem protecting a page with a password

As we know, there is a built-in option in WP to protect a certain page with a password. Under the general settings for the page, I choose to show it only with password and set the password accordingly....
3
votes
0answers
210 views

Install plugin remotely

I have seen a couple services ( ManageWP, BlogVault ) where we supply them with the admin login details to our WordPress site and they programmatically install their respective plugin and then connect ...
3
votes
1answer
13k views

Overriding Plugin Template Files with Child Theme

So hopefully a simple question. I have a child theme installed and have been able to successfully override changes to a .php file that is held in my theme files by uploading it to my child theme. If ...
3
votes
1answer
82 views

Detecting when a custom taxonomy has been changed and display alert?

I'm building a plugin with a CPT and custom taxonomy - location. Everything's been working fine except I need to add a dismissible admin alert when the custom taxonomy has been changed either from the ...
3
votes
1answer
445 views

Wordpress admin notice in plugin function

i have sample wordpress plugin class. Im hooking woocommerce woocommerce_saved_order_items and i want create a admin notice. Add action from __construct works, but when i want create a notice in hook ...
3
votes
0answers
185 views

allow arabic letters when register new account

How can allow arabic letters when register new account ? i don't need to lose any security. If any of us, Arabs, want to register in any wordpress blogs we have to use English letters in “username” ...
3
votes
1answer
2k views

How to enable edit button in the theme's customize UI?

I saw on WordPress.com's theme customizer has this little blue (with a pencil icon in it) edit icon, they are SUPER user friendly! But seems default wordpress.org installation does not have it! Is ...
3
votes
0answers
127 views

How can I rewrite a plugin generated URL?

I'm using the wpForo plugin to create custom profile pages on the front end of my website. The profile URLs generated by the wpForo plugin look like this: example.com/community/profile/username/ ...
3
votes
0answers
78 views

Custom values are not translated

I'm trying to translate my plugin. Inside plugin's root folder I have 'inc' folder, where located registration.php file. This file has a code, which adds custom fields to comment form. (I use right ...
3
votes
2answers
163 views

Calling shortcode in wp_localize_script strips result

I am working on adding some functionality on a Wordpress plugin which after a certain click needs to call on some shortcode through ajax. What I first attempted was to call the shortcode inside of ...
3
votes
0answers
114 views

Disable plugins on cron and ajax page

I want to disable few wordpress plugins on my cron and an ajax page. I have already tried option_active_plugins filter but it's not working. I have checked and found most of the people say that ...
3
votes
1answer
290 views

category_name not working (not showing up in sql query debug)

My plugin has a shortcode and it retrieves animals. There are filters/arguments and they all work well except the category argument or parameter. The category name(s) is/are well passed to my ...
3
votes
1answer
3k views

Plugin updates are not shown

I have a site developed in WordPress 3.5.1. I have updated the WordPress to latest version (4.3.1), but it's not showing the plugin updates. It's showing all plugins are up to date, but i have already ...
3
votes
0answers
143 views

How should I handle errors within a plugin?

Building my first serious attempt of a Wordpress plugin. I'm not sure how I should handle errors. I really just want to give the user some kind of message that the variable is wrong instead of ...
3
votes
1answer
501 views

Cropping, Re-sizing and Saving images from one folder to another folder in wordpress

I'm adding an upgrade for the WordPress plugin which I have developed ages ago. This plugin is just a product catalog, so just show products and their images. Products can have more than one images. ...
3
votes
2answers
4k views

Plugin: How to make links in admin page open up inside of the admin panel

In writing my plugin, I have added my menus and submenus to the admin page. The pages load and function as intended. What I am trying to do is create some links inside of these pages that will pass ...
3
votes
2answers
2k views

pre_set_site_transient_update_plugins wont call on hosted webspace

I am trying to use pre_set_site_transient_update_plugins to update my plugin from a GitHub repository. For that I am using this example. On my Dev-System (MAMP for Mac Version 2.2) everything is fine....
3
votes
0answers
413 views

post_content getting cut off on blank space on $wpdb->update

I am publishing the following post via xmlrpc <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <html><head><meta http-...
3
votes
2answers
1k views

Adding a widget programmatically

I want to add widgets to my wordpress site programmatically. I tried the following code from the codex docs: class MyNewWidget extends WP_Widget { function MyNewWidget() { // Instantiate ...
3
votes
2answers
459 views

Why doesn't the WordPress Importer update posts?

One can see from the code on the WordPress Importer Plugin that it was a thought decision to bail early when imported posts had post_title and post_date matching existing posts. For that reason, ...
2
votes
1answer
31 views

Popup Cookie Wordpress select language and section (Elementor)

I need to show a popup where the user can choose the language and which section to open (partners, customers, support) and that this choice is kept in the cookies so that the next time he returns that ...
2
votes
1answer
42 views

Remove filter from WordPress Plugin

I am using a plugin called that causes all of distributed posts to have a rel=canonical back to the source. I reached out to the developers and they told me the following: By default, canonical URL ...
2
votes
0answers
23 views

Looking for a solution - slightly convoluted problem

OK so stick with me on this one... it's a little involved. I won't describe it all, I'll simplify things as best I can to the basics. OK so, on my wordpress site I have three text boxes (BOX1,BOX2,...
2
votes
0answers
33 views

How to change ID of an attachment in wp_posts and its related tables correctly?

I have two posts in my wp_posts table where post_type='attachment' The picture below shows the records related to those in wp_postmeta table I need to change the IDs of those files. What I am doing ...
2
votes
0answers
39 views

How to Replace Words with Hypertext Link But Ignore Previously Existed Links?

Auto-linking for "selected words" in the_content I am currently using the following code: function wp_affiliate_links($text){ $replace = array( '/ example /' => ' <a rel="nofollow" href="...
2
votes
0answers
34 views

How to find out what blocks are added by a plugin

I am creating a plugin, which adds a number of blocks defined by JS/PHP as per Gutenberg documentation. I want to display these block names on an admin page. Is there a hook or function I can use ...
2
votes
0answers
170 views

how does wp.media javascript library work?

I'm building a custom dashboard and I'd like to add a feature which allows a user to upload an image. However, by calling wp.media() (with a title, button & multiple args) javascript throws an ...
2
votes
0answers
160 views

Changing image size to full size in Gutenberg's block gallery

I'm using Wordpress 5.0 and I love it so far. The only problem I have with Gutenberg editor is that its "block gallery" doesn't work so well. I have some 4K screenshots in block gallery, but it looks ...
2
votes
1answer
46 views

How to link to YouTube videos with thumbnails?

I am brand new to WordPress and find it very confusing. I have a small blog and cannot find a way to easily add a small grid of YouTube thumbnails that link to those videos. I have looked at all ...
2
votes
1answer
27 views

What is the way to ship read-me strings like plugin-strings for internationalization?

I want to translate my plugin for non-English languages. But for readme strings, I could find the only option to submit translations over translate.wordpress.org. Is there any way like the one ...
2
votes
1answer
361 views

Permission Check for REST API Endpoint Runs Twice?

I'm making a plugin using the WP REST API, and everything seems to be working as expected. However, there is behavior I don't understand. The authPermissionCheck() method is executed twice for each ...
2
votes
0answers
30 views

Is there a reliable way to keep track of how long a WordPress theme has been active?

I want to keep track of how long a specific WordPress theme has been active, not just installed. The end goal being I want to display a notice after a user has created x number of posts and the theme ...
2
votes
0answers
257 views

wp_get_nav_menu_items return results are insane

I was hoping to create a plugin that adds a new post to a Menu on the second sub-items. However I can't ever seems to get the orders correctly it some times work and sometimes doesn't. Last thing I've ...
2
votes
0answers
511 views

Hook (upgrader_process_complete) running moment

i want to use the upgrader_process_complete (documentation) to check if my plugin was updated (to run some scripts). My question is: when this action is triggered, WordPress is already running the ...
2
votes
0answers
255 views

Issue to get wp_get_attachment_image with cmb2

I have a problem get the image with cmb2, I have tried in many ways without successm according to the documentation, this is fine, what can I be doing wrong? add_action( 'cmb2_admin_init', '...
2
votes
1answer
55 views

How to have the right design for a custom post type without accessing themes

I am trying to create a music player plugin for WordPress. Using custom post types, and custom fields, I could make posts that takes a URL and artwork. The player works based on jQuery and once the ...
2
votes
1answer
509 views

wp_verify_nonce() why return false?

I was to tried create theme options admin page (without settings API) in this code I'd like to know why wp_verify_nonce return false: main file <?php add_action('admin_menu', '...
2
votes
1answer
713 views

Admin page: form with enctype=“multipart/form-data” does not transfer its data

I'm googeling for hours now but can't find anything to my problem: I'm building a plugin and want to embed a file input in its admin page. For this reason I'm giving the form-element the attribute ...
2
votes
0answers
38 views

How can I get the post content displayed in a text field that allows to edit posts?

I replaced my WordPress TinyMCE editor with a custom textarea field. Everything works well when saving the post but whenever I want to edit the post, the textarea field goes blank. I just want to ask ...
2
votes
0answers
491 views

How to add custom JS to tinymce in wordpress

So I want to enhance the functionality of the TinyMCE editor in WordPress by adding custom JS script and CSS to it. I was able to add custom CSS to it by using this method: function plugin_mce_css($...