Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [plugin-development]

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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
85 views

Access DOM Element in Gutenberg Block on WP Admin Post Edit Screen

I'm developing a custom Gutenberg block called Weekly Meetings Block that was first created using the @wordpress/create-block npm package. For this block in the WP Admin, you can add options from a ...
risingPhoenix1979's user avatar
0 votes
1 answer
29 views

Sanitization of register_setting()

How to do sanitization at register_setting() ? I am learning Plugin Development. I am using below code. public function settings_page_registration() { register_setting( '...
abu abu's user avatar
  • 203
0 votes
0 answers
27 views

Problem with inline style CSS properties issue on DIV

I am building a custom dragable interface where user can build form and drag elements. I am facing issue with inline style properties. The example html is given below $content = <div style= "...
iZeshan's user avatar
  • 101
0 votes
0 answers
22 views

Remove slug of multiple custom post types with and without hierarchical

I have two custom post types called toplijst and product. I am trying to achieve the following permalink structure: Toplijst: website.com/toplijst/parent-toplijst/ website.com/toplijst/parent-toplijst/...
sem roijackers's user avatar
0 votes
1 answer
80 views

Page jumps to top

I have a problem with a website, that I edited with Elementor. It keeps jumping to the top of the page after 1 sec. I have tried to move the navigation bar down, to see if that's what causes the ...
Julie's user avatar
  • 1
0 votes
0 answers
14 views

How to add a react element into the DOM node (only on the user-interaction like on click) without using the state?

I'm working on a WP plugin project that requires a react element to take the position of the main DOM node(main component) content when the button is clicked, but without the use of state in the main ...
Shashikant Yadav - Kantbtrue's user avatar
0 votes
0 answers
25 views

How to pass a user_id to a custom plugin

This may not be the best way to do this. The client needs to be able to enroll users into custom courses that's defined in another post_type. I can't find any documentation that allows me to add a ...
Max's user avatar
  • 1
0 votes
0 answers
29 views

Overwrite WordPress Plugin Class Function

I just want to customize the inline style of the div-element. The function looks like this: class class_eqw_product{ //other code here function add_loop_enquiry_button() { global $product; ...
Thomas's user avatar
  • 1
0 votes
0 answers
45 views

Custom database table entry edit page

I can display every row of a custom DB table in my custom sub page, but I'm not sure how to implement a single row edit page. Is it as easy as verifying some link query parameter and then displaying &...
fuji's user avatar
  • 101
0 votes
1 answer
155 views

Javascript function defined in view.js not reachable from save.js

I am trying to develop a custom gutenberg block. I have a form in save.js: export default function save() { return ( <div {...useBlockProps.save()}> <form onSubmit={...
Shugui's user avatar
  • 1
1 vote
1 answer
334 views

Call to undefined function create_function() - PHP 8.2

My wordress plugin is giving some issue. I am using 8.2 PHP version but the plugin is very old. define('BBP_BBCODE_PATH', WP_CONTENT_DIR.'/plugins/'.plugin_basename(dirname(__FILE__)) ); //Admin ...
Priyank's user avatar
  • 11
1 vote
1 answer
26 views

Cron Job not working

I am trying to trigger a function using cron job in a time interval of 1 minute but it is not working, am I missing something? register_activation_hook(__FILE__, 'my_event_recurring_activation'); ...
v morgesh's user avatar
0 votes
0 answers
44 views

Need to add custom cart item data

I need to create custom elementor product carousel. From that carousel there is a date field. User can select date and add product into cart. The selected date will be displayed as 'preferred date' ...
Khalid Saiffullah's user avatar
0 votes
1 answer
64 views

How to get next day date of a specific day

I have created a shortcode in WordPress to show next day date of a specific day but it does not show the correct date when I am passing the parameter through the shortcode. Can anyone tell me what I ...
v morgesh's user avatar
1 vote
0 answers
57 views

Update plugin from github

I'm working on a WordPress plugin hosted locally on GitHub, and it includes several addons. When updating a specific add-on, I want to ensure that the main plugin is of a particular version before ...
Saqib Ali's user avatar
0 votes
1 answer
177 views

How to move custom gutenberg block controls from settings to styles tab?

I'm writing custom Gutenberg blocks for my future projects. I have a few blocks and everyone of these has its own controls that allow change of border attributes, colors etc. All of these controls are ...
Mateusz's user avatar
  • 255
0 votes
0 answers
14 views

Expose hidden custom post type

I use a plugin that generates some custom post types, such as 'ctp_1' ctp_2' etc... I also use a form plugin with a post management feature that allows me to either create or update posts throught ...
Paolo Montalto's user avatar
-1 votes
1 answer
217 views

Add taxonomy or category slug to custom post types URL

I have created a custom plugin that is similar to Woocommerce but will only manage products that are loaded using the WP REST API in a Vue SPA. I've registered two custom post types, one for products ...
OHICT's user avatar
  • 133
0 votes
1 answer
29 views

audio tags no longer working

On my website, I had a plugin, that displayed a media tag like [audio src=path/file.mp3]. It returned this tag in the HTML retruned from the shortcode function. function init() { add_shortcode('...
Lorenz Meyer's user avatar
0 votes
1 answer
156 views

Endpoint returning a 404

Hi I've built a wordpress plugin using a class. I'm sure all names (functies, urls, etc are correct. I'm trying to access my endpoint url using http://localhost/inschrijfmodule/wp-json/endpoint/...
Jan's user avatar
  • 33
0 votes
0 answers
12 views

My Wordpress plugin don't show the button on Gutenberg

I create the follow plugin to fullfill this: "Create wordpress plugin that does the following: Has a button that shows up in the Gutenberg editor for a post, in the sidebar, often referred to as ...
Manuel's user avatar
  • 1
0 votes
0 answers
22 views

Control a Wordpress plugin auto-update rate time

I am writing a plugin, I want, in some cases, to tell WordPress to update that plugin, and that plugin only, immediately. I know that there is a transient called update_plugins that contains the ...
DavSev's user avatar
  • 143
1 vote
1 answer
30 views

Trouble with WordPress Settings API: Form Submits When Fields Called Directly, Fails When Using Callbacks

0 I'm working on a WordPress plugin and facing an issue with the Settings API. I have a settings page with two forms. The first form uses do_settings_sections() to call fields from a public function (...
user2765920's user avatar
0 votes
0 answers
37 views

get_posts() return NULL using a custom plugin and add_submenu_page() with Post Type

Inside a custom plugin and using add_submenu_page() for custom post type I want to display one post. As the other post_type I use get_posts($the_id, $arr_params) to get information about it, except in ...
imagIne's user avatar
  • 83
0 votes
1 answer
107 views

Form submission issue in wordpress admin (custom plugin) using $_GET for searching & filtering

I have a custom plugin that was built by a developer which was working fine until last week Friday. The plugin is running on wordpress.com platform rather than a stand alone Wordpress.org CMS. An ...
user2274299's user avatar
0 votes
1 answer
54 views

Mixed results with is_page() WordPress function, when using $this, or self

I'm converting an old plugin from PHP5 -> PHP8 and I came across this check, which caused an error when executing: Notice: Accessing static property PropertySearch::$listing_details_template_name ...
level42's user avatar
  • 113
0 votes
0 answers
118 views

Include theme header and footer in custom plugin

I am working on a custom plugin. I created a custom post type inside my plugin. Now, for single posts I want to serve a custom template using my custom plugin without touching any theme file. The ...
Farhan Ali's user avatar
0 votes
0 answers
51 views

Woocommerce Payment Plugin with Mycred being the payment processor

some help please. I am trying to build a Woocommerce Payment Plugin with MyCred being the payment processor on another website. The mycred remote api is well configured, and I wrote the payment method ...
JoseLawrence's user avatar
0 votes
0 answers
17 views

Best Practice for Implementing OAuth2 Callback Logic in a Dedicated Page vs. in the init Hook

I am currently developing an OAuth2 plugin where I need to implement a callback URL for handling authentication logic. Currently, I have the logic hooked into the init function, checking if the URL ...
SkyRar's user avatar
  • 202
0 votes
0 answers
23 views

Is there a hook for updated image metadata upon using image editor?

When a user uploads an image, I am able to use the wp_generate_attachment_metadata hook to know about all the thumbnail locations. When I use Wordpress to Edit Image (to scale, resize, etc), I can not ...
Dave Stein's user avatar
0 votes
0 answers
10 views

Can I know what changes happened after using native Image Editor?

If someone uses the WP Image Editor, I want to know what edits were done. I tried out some simple sample code like this: add_filter( 'wp_save_image_editor_file', 'after_edit', 10, 5 ); function ...
Dave Stein's user avatar
1 vote
1 answer
21 views

How to remove lazy-loading from first 6 images in Wordpress?

I`m optimizing site with PageSpeed test tool. How to remove lazy loading from 7 first thumbnails (featured images) in front page and categories? By default worpress lazy-loading from 4th image, but I ...
uni uni's user avatar
  • 11
0 votes
0 answers
22 views

check difference between two timestamp in custom plugin

I have this code in my custom plugin. It's supposed to check if a timestamp is older than 24 hours $today = new DateTime(); foreach( $customers_to_activate as $customer_details ){ $time = $...
OHICT's user avatar
  • 133
0 votes
0 answers
36 views

Edit password change email text or disable it

I have a function in my custom plugin that will be called after the user do the fisrt login. The function, after a check will give to the user the ability to change it's assigned password with a ...
OHICT's user avatar
  • 133
0 votes
1 answer
72 views

Plugin Internationalisation and textdomain

I have developed seven Wordpress plugins for a new project as I was not able to find anything that currently supported these features. Three of them have interest from other users and one of those ...
Walrus's user avatar
  • 131
0 votes
1 answer
70 views

How to manual update a private WordPress plugin from free to pro version

I have a wordpress plugin in my wordpress repo. It's a free version. There are some features that are only available in the pro version of the wordpress plugin. I put a download link from where users ...
Jason's user avatar
  • 101
0 votes
0 answers
23 views

Plugin Inserts content before Page Content [duplicate]

I have a plugin that pulls comic book data from the Marvel API. I have assigned it a short code. When I place the shortcode on the page it does the following: Before: After inserting the shortcode it ...
user1689274's user avatar
0 votes
1 answer
28 views

Inactive plugin warnings logged in log file

I have enabled WP_DEBUG in config. I have also set WP_DEBUG_LOG to true WP_DEBUG_DISPLAY is false. I have one of the custom plugin that is inactive from the admin. But when i check the log file, there ...
Rajeev Vyas's user avatar
  • 2,523
1 vote
0 answers
46 views

Using send_password_email filter after wp_update_user

I have created a custom plugin that will provide some custom user roles that are named customers and operators. When an user will create a new account, I've created some logics that imply that ...
OHICT's user avatar
  • 133
0 votes
0 answers
187 views

Application password header not checked in REST API

I have this code in my custom plugin. I've created an application password and I want to check it every time a custom endpoint is called. register_rest_route( $this->namespace, ...
OHICT's user avatar
  • 133
0 votes
1 answer
18 views

Compare user meta values before update them

I have this pseudo code I'm writing to compare the user meta values. I have some user meta that will hold a null value until the user update his account, before the values are updated I need to check ...
OHICT's user avatar
  • 133
0 votes
0 answers
42 views

404 error on page reload

I have created a WordPress based web app that will rely on template pages that will host some vue.js different front-end apps. I've added this code to the theme functions file to rewrite all the ...
OHICT's user avatar
  • 133
0 votes
0 answers
35 views

REST API callback function is not called

I have a very simple function which used to work perfectly fine. Somehow the callback function is not called anymore: add_action('rest_api_init', 'create_api_posts_meta_field'); function ...
Fewture's user avatar
  • 13
0 votes
0 answers
38 views

Update Cache on Save Instead of Clearing It?

I'm working on getting my wp-admin faster and is thinking about how I can get those slow get_posts() with a lot of meta queries faster. I have already made som progress with replacing a lof of LEFT ...
Peter Westerlund's user avatar
0 votes
2 answers
362 views

wp_mail - send emails after 24 hours from users registration

I have writed a lugin that will send emails after the user completed a custom registration form. I need to send emails after 24 hours from registration, is this possible by using the wp mail function? ...
OHICT's user avatar
  • 133
0 votes
0 answers
38 views

Images stored from external API not loading

The following is my code I am using to store image that I am getting from an external API using my own plugin. The images, or any media in general, are not loading on the frontend or the Media tab on ...
I. Antonov's user avatar
0 votes
0 answers
28 views

Can't save Image from external API into Database

I am trying to create a plugin that gets data from an external API and stores the data into the database. The data I am receiving, contains Texts and Images. I have to save them separately as in the ...
I. Antonov's user avatar
0 votes
0 answers
35 views

Editing a block to add a button to have a drop cap

Currently, I have a code to edit the paragraph block and add a button to convert it into having a drop cap. const { __ } = wp.i18n; const enableToolbarButtonOnBlocks = ["core/paragraph"]; ...
Omar's user avatar
  • 1
0 votes
0 answers
20 views

WP Form Date Field - Remove Day option

I’m using the WP Form date field in dropdown format. Is it possible to disable the Day option? I need the user to select only Month and Year.
Adeel Abbas's user avatar
2 votes
0 answers
262 views

Gutenberg move post/page title to Editor sidebar document panel

I have not liked the way that the post/page title in Wordpress 6 / Gutenberg is contained directly in the block editor. I have found many ways to remove it with filters and / or restyle it but ...
Walrus's user avatar
  • 131