Unanswered Questions
4,250 questions with no upvoted or accepted answers
3
votes
1
answer
3k
views
How can I add a custom header to a custom template in a plugin without using the theme folders
There is a lot of documentation on how to create custom headers for a theme. For example, if I wanted to add a header named:
header-custom.php
I would add this to my template file:
get_header('...
3
votes
1
answer
2k
views
Add new password rule to Ultimate Member register form
I use Ultimate Member and classic form for registration.
I have enabled "Strong password", but I want my users to at least fill their password with 1 special character (like "# % $ ...&...
3
votes
0
answers
394
views
How to fix wrong attribute error for Visual Composer Grid Builder?
Hello I am facing this issue in editing media grid layout of Visual Composer V6.2.2. Below is the error I am getting
Fatal error: Uncaught Exception: Wrong attribute for 'vc_single_image' shortcode. ...
3
votes
1
answer
2k
views
Trying to add admin file upload form plugin
I'm trying to create an upload form from my admin page via a plugin.
I've cobbled together some code from a few sources, including this one:
https://www.htmlgoodies.com/beyond/cms/create-a-file-...
3
votes
1
answer
229
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
0
answers
572
views
Solve cors problem using rest api or ajax
I'm building an app with nuxt using WP as a CMS, so I have this code in my functions.php to allow any origin (temporary) using the rest api and admin-ajax urls
function add_cors_http_header(){
// ...
3
votes
1
answer
318
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
0
answers
1k
views
Is it possible to intercept all ajax requests and get the parameters and the returns?
Is there any hook that always goes through it, where I can see all the requests, and also the returns after the "action" that is executed?
I need to intercept all requests, including requests from ...
3
votes
0
answers
78
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 ...
3
votes
1
answer
858
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
1
answer
306
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 ...
3
votes
0
answers
50
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
1
answer
1k
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($...
3
votes
0
answers
479
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
1
answer
2k
views
How to Use JSON With AJAX?
I've defined a PHP callback function to handle the communication between server-side and client-side:
function json_render_modal_body() {
check_ajax_referer( THEME_PREFIX . '-modals', 'nonce' );
...