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
18 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
13 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
  • 153
0 votes
0 answers
12 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
27 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 ...
ICTDEV's user avatar
  • 113
0 votes
0 answers
11 views

Implementation of a Download Wrapper

We have a number of static files (thousands) that are linked in WordPress from a post using Advanced Custom Fields and able to be downloaded. I am aware that this is insecure, but it is an inherited ...
Simon's user avatar
  • 111
-1 votes
0 answers
13 views

WooCommerce Plugin for min. order quantity [closed]

First of all, I'm sorry if there's a plugin like that and I wasn't able to find it, but I did my research and seems like I couldn't find a working solution for me. The scenario is following: I have a ...
user9111007's user avatar
0 votes
1 answer
10 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
31 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
9 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
16 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
28 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
18 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
  • 41
-1 votes
0 answers
11 views

I want students to be able to insert Mathematical notation for answer to QSM plugin question

I am creating a quiz using QSM plugin on wordpress. I have mathjax also loaded. I can i set you quiz so students can input Mathematical notation in their answers.
Raj's user avatar
  • 1
0 votes
1 answer
16 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
34 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
  • 103
0 votes
0 answers
36 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
18 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
14 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
8 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
18 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
16 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 = $...
ICTDEV's user avatar
  • 113
0 votes
0 answers
16 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 ...
ICTDEV's user avatar
  • 113
0 votes
1 answer
30 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
49 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
21 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
0 votes
0 answers
20 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 ...
ICTDEV's user avatar
  • 113
0 votes
0 answers
45 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, ...
ICTDEV's user avatar
  • 113
0 votes
1 answer
13 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 ...
ICTDEV's user avatar
  • 113
0 votes
0 answers
21 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 ...
ICTDEV's user avatar
  • 113
0 votes
0 answers
18 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
16 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
69 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? ...
ICTDEV's user avatar
  • 113
0 votes
0 answers
31 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
27 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
29 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
10 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
50 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
0 votes
0 answers
7 views

Woocommerce Payment Method Change

How do I go about setting all orders that are on-hold to have a Payment method of cod? Any tips on what hooks I can use would greatly be appreciated! Thanks Edit: I have written this code but the ...
Nathan Wilson's user avatar
0 votes
0 answers
31 views

How to modify the uploads directory for wp.media.frame assigning an subfolder name

To be better organized I must be able to manage the media independently of the user. So in addition to restrict user to see only these files(images, docs, videos), I need to insert media for each ...
imagIne's user avatar
  • 41
0 votes
0 answers
7 views

How to add usermeta for existing users when user profile is updated

I need to add an usermeta field for users when they decide to modify some account informations on a custom form. At the moment I'm calling the wp_update_user() but since I want that the modifications ...
ICTDEV's user avatar
  • 113
0 votes
0 answers
21 views

Cache API Images to Prevent Hot Linking

I'm building a shortcode that display's a list of items from a public API, that each have a thumbnail URL. If I use the URL as src attribute, I create a request to their server for every image. I want ...
Cebbi's user avatar
  • 123
0 votes
1 answer
65 views

WordPress getting data from external API

I am trying to create a Plugin that does the following jobs: Authenticate the user to get Bearer token 'access_token' Get data from API and store in Database I have checked all the APIs and ...
I. Antonov's user avatar
0 votes
0 answers
16 views

Sticky bar with filter button and product count

I use elementor and hello theme. I need to create a sticky bar with filter button and product count when you scroll product archive, similar to https://www.chanel.com/it/make-up/labbra/c/5x1x1x31/...
avenz's user avatar
  • 1
0 votes
0 answers
75 views

Zip using "wp-scripts plugin-zip" with custom "build" folder and subfolders?

I rename the default build folder to blocks, but when I execute the command for zip npm run plugin-zip I get only two files in the zip output (dts-haya.php, readme.txt). My folder blocks contain two ...
Giovanna Penna Eirada's user avatar
0 votes
2 answers
31 views

Too few arguments - wp_login action

I'm looking for a way to avid that some custom users roles are able to see wp-admin dashboard. I've found this topic and in my plugin class I've tried to use the two action suggested, but I will get ...
ICTDEV's user avatar
  • 113
0 votes
1 answer
39 views

WordPress hack code issue, help required

I found this plugin installed on my website, i didnt installed, and this also dont show under site-url/wp-admin/plugins.php its a WordPress website. What could the purpose of it ? add_action('...
moneeb's user avatar
  • 23
0 votes
1 answer
23 views

wp_head filter not executed inside custom class

I have this code in a simple plugin that is supposed to make wordpress unbranded: <?php /* * Class to remove wp-* branding from WordPress * @package users-manager.php */ class WpUnbrand { ...
ICTDEV's user avatar
  • 113
0 votes
0 answers
19 views

redirect logged users to custom front-end insetad of wp-admin

I have this three functions in my custom plugin. I have created a custom front-end and I'm using an SSO plugin that will get the registered data from usermeta table to pass them to magento if an user ...
ICTDEV's user avatar
  • 113

1
2 3 4 5
133