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
7 views

Automated Cart Update With Alert Box Each Time

New To PHP and, I am currently attempting to create a plug in that creates an alert box every time the quantity in a cart is changed. So far I have successfully implemented updating the cart ...
user avatar
0 votes
0 answers
9 views

Wordpress video js error this.mediaElement.play is not a function

I am using the video.js library in WordPress it causes an error (ERROR: TypeError: this.mediaElement.play is not a function) since I have installed themify builder plugin. Error picture attached. Can ...
user avatar
0 votes
0 answers
12 views

CRUD and Frontend show from a custom table without shortcode

I just wrote a plugin that creates a database, populates and edits rows from the backend, now what I need to show a list view of those rows with teir respective link to a detail viewo of each one. The ...
user avatar
  • 1
0 votes
0 answers
21 views

It is possible to pass $args that sent by add_settings_field() inside another function?

I'm trying To do my plugin Setting with OOP PHP when I'm Creating Setting Filed it sends $args so I can use it in their function, but when I call this function in another place it is for $args and it'...
user avatar
0 votes
1 answer
11 views

Table of contents (TOC) plugin is not showing header tag

I made a post template using meta box(custom field). If I put data into metabox, the template part (contents with h2, h3, p) shows up at the bottom of post (not on post edit page). However, every TOC ...
user avatar
0 votes
1 answer
44 views

PHP File_exist() not working - Checking if File Exist in WordPress Theme Directory

I am trying to check if a certain archive file template exists in the WP theme directory. This is my code, I am not sure what I am missing here. <?php $file_name = '/archive.php'; $...
user avatar
  • 182
0 votes
0 answers
13 views

WCFM vendor registration create a new select for the existing phone element [closed]

Hi does anyone have experience with wfcm vendor registration? I need to create a new select for the existing phone element where the country_code selection will be displayed. it should then look like ...
user avatar
0 votes
1 answer
19 views

Can we intercept user_login and user_pass from a wp_login_form?

with my plugin, I have a login form. I use the wp_login_form() function of Wordpress. As you know, this function links to the wp-login page. But if the user_login is not present or if the email is ...
user avatar
0 votes
1 answer
20 views

Empty Pdf file generated with FPDF library in WordPress plugin [closed]

I am currently implementing a pdf export functionality within a wordpress plugin i'm developing but the pdf file generated when i click on export button is empty. To implement the export i use FPDF ...
user avatar
0 votes
1 answer
13 views

Redeclaring a plugin function within a class

In the code below, a user defined add_meta_box() function is hooked to add_meta_boxes action. How does wordpress know that the add_meta_box() function used inside the user-defined add_meta_box( $...
user avatar
0 votes
1 answer
12 views

Remove all messages, when untrash a post

I'm trying to replace default untrash message to my own with error class. admin_notices do everything as expected, but even if I return empty messages array in bulk_post_updated_messages filter, I'm ...
user avatar
0 votes
1 answer
37 views

How to Get Category Name When Export Products

I'm writing an export plugin for WooCommerce. I want to print the product categories and subcategories in separate columns while exporting the products in the plugin I developed. My code is as below. ...
user avatar
1 vote
0 answers
21 views

How to stop your plugin from executing on certain pages?

I'm building a plugin that extends WooCommerce and I want to prevent it from executing once it hits the template_redirect hook. My goal is to stop the plugin from loading all the assets on non-product ...
user avatar
0 votes
1 answer
23 views

Dynamically insert code to custom post type loop

I need to display post from custom post type name "film", from a specific taxonomy "Horror." Everything work fine when I type the taxonomy directly like this: <?php $blog = ...
user avatar
0 votes
0 answers
20 views

How to Get Last ID?

I am developing a plugin for wordpress. I have created table in SQL for export ID. I need to call back this ID by adding 1. The code I use is as below This is how I query the ID in SQL table. ...
user avatar
0 votes
0 answers
10 views

Install a MU plugin from within another plugin

I am writing a plugin that needs to disable another plugin on specific pages of the site. I know how to do this using the option_active_plugins filter, but that filter only works from an MU plugin. ...
user avatar
1 vote
1 answer
26 views

Changing labels of status filters for post grid

Is there a way to change filter labels for custom post type? For example, change Drafts (2) to Disabled (2) without localization plugins like Loco Translate? I've tried apply_filters( "views_{$...
user avatar
0 votes
1 answer
23 views

How does add_option() function enable action hooks to fire right after actiavtion?

The documentation page says that the hook process performs an instant redirect after it fires. So, in order to do something right after the activation the page suggests using add_option like so, ...
user avatar
0 votes
0 answers
12 views

Change reminder email date to 14 days before

I want to send the reminder email for a booking (from the Woocommerce Booking plugin) 14 days before the activity instead of the default 1. I have found the following code online and added it to wp-...
user avatar
0 votes
0 answers
10 views

Console errors in 6.0-RC1 Widget screen

Sine 6.0-RC1 the following console error appears on the block widgets screen, on Firefox: Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a ...
user avatar
0 votes
0 answers
39 views

Why is this shortcode outputting results in the the order of how they're entered in ACF? [closed]

I've been attempting to create a plugin that takes some ACF options page fields, and creates a shortcode which outputs an advertising code attached to an attribute within the shortcode e.g. [awin id=&...
user avatar
  • 11
0 votes
0 answers
18 views

Custom Icon for Plugin

is there a hook to add a icon to a plugin? I just found the information about how to add it, when you want to publish a icon. https://developer.wordpress.org/plugins/wordpress-org/plugin-assets/
user avatar
  • 13
0 votes
1 answer
20 views

Custom post type category link redirecting to 404 page

I have created a custom post type. There is no issue with post and it's working. I am getting issue in the catgory links. When i click on the Category name it's redirecting on 404 page I am getting ...
user avatar
0 votes
1 answer
27 views

Plugin main file is constantly been fired on every website visit

Greetings to everyone! I'm working on a WordPress plugin, and while debugging something with the error_log function in the plugin main file, I noticed that the main plugin file is constantly fired... ...
user avatar
  • 3
0 votes
0 answers
21 views

Change the behaviour of a button

I'm using Flatesome theme and I have a use case that I need to refresh the page after closing the popup, I'm wondering if I can change the behavior of the close button in Lightbox Popup so instead of ...
user avatar
1 vote
0 answers
15 views

How to get specific setting by settings_fields()?

I am working on a plugin and on the settings page I have 2 settings and I want to show Only one setting "backgroundColor" so how should i do that? This is the code: <form action="...
user avatar
0 votes
0 answers
15 views

Custom page from wp admin area

I would like to display custom page from Wordpress admin area. My plugin code is as follows: add_action('admin_menu', 'apvr_admin_menu'); function apvr_admin_menu(){ add_menu_page(esc_html__(&...
user avatar
  • 357
0 votes
1 answer
18 views

Woocommerce inventory [closed]

I'm working on woocommerce project and I need to check inventory status via external API before I create order. It is a cash register system in physical store that I can't change. I'm using ...
user avatar
  • 23
0 votes
1 answer
38 views

Scheduling an event inside plugin class is not working

wp_schedule_single_event is not firing. I wrote a function that is posting to external API, if it failed I schedule the same posting function to run 5 seconds later in cases of timeouts. Here's the ...
user avatar
  • 96
0 votes
0 answers
8 views

Change Dropdown jQuery to show/hide but with default place holder that shows all

How to set the jQuery so if default "Department" is selected show all, and only hide all else one other section made. for example, if non selected will be "Department", if "...
user avatar
  • 105
0 votes
1 answer
23 views

How to remove the message 'We could not find any results for your search' without changing template files and without adding posts/pages?

I take the question back with context. The goal is not to add posts or pages so that the post is replaced by the title of the post/page. The goal is not to modify the search.php file to remove this ...
user avatar
1 vote
1 answer
50 views

Escape when echoed

I've been trying to submit a plugin for review and I keep having problems with the echo line. The last version I sent was like this. <option value=""> <?php _e( '- Default', ...
user avatar
  • 15
0 votes
0 answers
36 views

WP_Query order posts by category

In a custom WP_Query I want to order posts by category. I mean that I want to show posts with term_id=1291 first and then show other posts. when I use two WP_Query , I cant use pagination. "...
user avatar
0 votes
0 answers
9 views

Custom Block Not Shown in Block Inserter

I am attempting to create a new custom block plugin in Wordpress v5.9.3. I'm following this Wordpress guide on creating a simple block. My block does not appear when I search for it in the Block ...
user avatar
0 votes
0 answers
14 views

How to override supports of innerBlocks?

Is it possible to specify the supports of each specific InnerBlock when using nested components?, In the following example I want to disable the color background feature added in the theme.json to the ...
user avatar
0 votes
1 answer
36 views

Login page too many redirects

I have a custom plugin that handles the login and verification of customers. It creates default WordPress users with custom usermeta. But as an admin whenever I try to access the wp-admin dashboard on ...
user avatar
1 vote
2 answers
66 views

Can we use a webservice with Wordpress?

Assuming that my site uses a database through the web service to fetch content, style and other things for my site. Can we make this connection in a way provided by the CMS? A plugin does that? Should ...
user avatar
0 votes
1 answer
13 views

enabling Twig as Template Engine withing own plugin [closed]

I would like to integrate an Templating Engine (TWIG) within our custom plugin. My question is: how to handle/pass parameters which already are "echoing" its content. for example: echo $this-...
user avatar
0 votes
1 answer
41 views

How to correctly escape an echo

In WordPress they recommend that I should escape any part of the code of my plugin that shows data to the user, I have made most of the corrections but this specific case I don't know how to escape ...
user avatar
  • 15
1 vote
1 answer
25 views

Where to call add_shortcode function in WordPress Plugin Boilerplate?

I am creating a new plugin and have decided to use WordPress Plugin Boilerplate. However, I'm not sure where the correct place is to call WP's add_shortcode. I'm stuck on two counts: add_shortcode ...
user avatar
0 votes
0 answers
19 views

PHP using external anonymous function inside class

I have two files. In file1.php I have an anonymous function: $myfunc = function($params) { // do something } in file2.php I have a class and inside this class I need to use the function ...
user avatar
  • 1
0 votes
0 answers
19 views

Want to create custom design of progress indicator in wpforms

Is there any way to create custom design of progress indicator of multistep form in wpforms. By default wpforms has three templates to chose from. I have chosen progress bar which has design like this ...
user avatar
0 votes
0 answers
11 views

Set the payment processor callbacks to a plugin

We need for our Wordpress page a plugin which processes in certain situations the payments independently from the regular check-out page. Normally, a payment processor like PayPal, Stripe and others, ...
user avatar
0 votes
0 answers
16 views

Configuring Xdebug with docker compose

I'm trying to configure a WordPress development environment with docker-compose and Xdebug but I can't get the debugger to work with a simple break point on info.php file after starting my debugging ...
user avatar
0 votes
0 answers
15 views

.htaccess with Wordpress - create my own pretty url with parameters (above Wordpress settings)

(first of all, sorry for my poor english) I have an url what is works just fine: example.com/myevent/?e=event_unique_title , I like to change the way to see it in the address bar to: example.com/...
user avatar
0 votes
1 answer
29 views

Translation for a text that is not printed on the screen

How can I enable the translation for a text that is not printed on the screen? I was recently implementing the translation to my plugin and everything worked as expected. But doing the tests I ...
user avatar
  • 15
0 votes
1 answer
22 views

Show current custom taxonomy

I have a custom post and custom taxonomy my taxonomy is called "department" i have my loop showing my custom post, I am trying to also show all the departments (custom taxonomy) that my ...
user avatar
  • 105
0 votes
0 answers
29 views

Paragraph Tags removed when contents are only a shortcode

I'm developing a plugin that given a shortcode with attributes will scan a json file and return the appropriate data etc. Given code like this: <!-- wp:paragraph --> <p>[environ data="...
user avatar
0 votes
0 answers
8 views

how to show youtube comment profile pic in wordpress

i want to show youtube user's comment section profile pic in my wordpress comment section As i am fetching youtube video along with its commnets but i couldn't show user's profile image in my comment ...
user avatar
1 vote
0 answers
22 views

Is there an additional block.json property to set to get an InnerBlocks child to respect the "supports" property?

My InnerBlock child block doesn't seem to respect the block.json "supports" property and I can't understand why not. For reference, this custom block is comprised of: a parent ucomm-blocks/...
user avatar
  • 220

1
2 3 4 5
126