We’re rewarding the question askers & reputations are being recalculated! Read more.

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,672 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6
votes
1answer
350 views

Auto Load Plugin Hooks inside Must Use Plugin

I am creating a custom MU plugin to run on a multi-site network. I am working on a function that will dynamically include files containing additional action and filter hooks based on the active ...
6
votes
1answer
320 views

Is there a way to use latex \cite{reference} in wordpress?

I am using QuickLatex plugin and it works great. But when I tried to cite some references using \cite{paper1}, it did not seem work. [latexpage] Here is a citation \cite{example}. \begin{...
4
votes
1answer
911 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
486 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 ...
3
votes
1answer
43 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
137 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
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
372 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
1answer
76 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
416 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
184 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
125 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
161 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
112 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
270 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
127 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
496 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
408 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
934 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 ...
2
votes
0answers
21 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
23 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
38 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
31 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
139 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
5k views

How do I configure WordPress to talk to a Microsoft SQL Server database?

We have are building a WordPress site on our intranet site and wish to connect it to a Microsoft SQL Server. I have downloaded and configured PHP and PHP Manager on IIS. I have also downloaded SQL ...
2
votes
1answer
43 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
26 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
0answers
50 views

Tracking changes in admin-page so user gets warning when leaving the page

An admin page with metaboxes and custom fields works fine, but when the user forgets to click "update" there is no warning "Leave Site? Changes you made may not be saved.". This warning only works on ...
2
votes
1answer
323 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
248 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
432 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
245 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
53 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
434 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
588 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
463 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($...
2
votes
0answers
172 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 ...
2
votes
1answer
12k 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 ...
2
votes
0answers
426 views

how to load tinymce external plugin

I'm trying to load external tinymce plugins but no luck so far. I know WordPress offers mce_external_plugins filter but it seems not make any difference. I have advlist tinymce plugin inside custom ...
2
votes
1answer
445 views

wp_enqueue_script fails to include in footer

In my Wordpress plugin I try to include two scripts in the page footer, like so: function my_interface_enqueues() { wp_enqueue_script( 'require-js', plugin_dir_url( __FILE__ ) . 'js/libs/...
2
votes
1answer
27 views

Reuse javascripts from plugins within the theme

I am trying to reuse the bxslider javascript that gets installed in a plugin. The page I am working on has this basic structure: SLIDER <-- configured in a plugin ...
2
votes
1answer
24 views

Cannot run the code after I activate the plugin

I wrote a plugin to write code into the wp-config.php – it should download a code file and add it to my wp-content. But I only can run the function manually. I want the plugin to run the function when ...