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
1 answer
19 views

How can I use the zip of my plugin in another website?

I created a new plugin for a WordPress project using @wordpress/scripts in my local environment. After I finished and ran the command npm run plugin-zip it generated the zip file but couldn't be ...
Moussa Saidi's user avatar
1 vote
2 answers
19 views

Wordpress Global Var in Plugin but Outside Function

In the theme functions.php, a global variable is set. // This is in functions.php add_action( 'init', 'me_set_globals', 1, 1 ); function me_set_globals () { global $my_global; if (1==1) { ...
Catsy's user avatar
  • 11
-1 votes
0 answers
16 views

How could I create a simple photo logoizer subpage in WordPress?

I need to create a separate subpage on a WordPress website where the user can upload an image, zoom in / out, and the program will automatically put a logo on the image, and then the user can download ...
Illes Toth Visualz's user avatar
0 votes
0 answers
22 views

WP_Query does not return the result even if the data is present in the database

I have a plugin that has following code $posts = new WP_Query([ 'post_type' => 'campaign', 'meta_query' => [ 'relation' => 'AND', ...
Praneetha's user avatar
  • 103
0 votes
0 answers
29 views

Upgraded to wordpress 6.5 and custom plugin no longer works

I wrote what is a relatively simple plugin that allows users on my woocommerce store to add a free sample to their basket, it's been working great until wordpress auto updated to 6.5, now when the ...
sico87's user avatar
  • 209
0 votes
0 answers
19 views

Is there a way to use MySQL JSON functions in meta queries?

There are JSON functions: https://dev.mysql.com/doc/refman/8.3/en/json-search-functions.html can be used to search in complex data with MySQL. In the case of meta keys and values it is an issue that ...
inf3rno's user avatar
  • 133
0 votes
0 answers
38 views

WordPress site Breaking after speed optimization [closed]

I have a WordPress site, and whenever I attempt to optimize it using WP Rocket, Nitropack, or other speed optimization plugins, my site breaks. However, upon disabling the plugin, it automatically ...
Bilal Afsar's user avatar
0 votes
0 answers
17 views

Cannot Access ACF Field Values via my Plugin

Objective I am working on a WordPress site built using Timber/Twig. I have a plugin (built using standard PHP and saved in the standard plugins folder) that is supposed to grab ACF values from a ...
Isaac Hillaker's user avatar
1 vote
2 answers
18 views

Is there a way to decide from init whether we are on a certain backend page?

On frontend pages I can do something like $currentPostId = url_to_postid($_SERVER['REQUEST_URI']); if ($currentPostId && $currentPostId === $postId) // ... So when I add a ...
inf3rno's user avatar
  • 133
0 votes
1 answer
14 views

When to store store plugin options as a single database record?

I'm building the analytics script plugin which offers customizations on a settings page. There will be around 20 options in total. Does it affect the performance negatively if I manage these 20 ...
Ostap Brehin's user avatar
0 votes
0 answers
9 views

Post URL redirecting to homepage

Please I need help, i have added dynamic content using Pods - Custom Content Types and Fields and the post url button is redirecting me to homepage instead of a single post page.
Cathrine's user avatar
0 votes
1 answer
20 views

Flash messages for not logged in users

I want to use flash messages to deliver validation error notices. For people who are not familiar this means that the user sends the form, I process the POST data, I store the error messages ...
inf3rno's user avatar
  • 133
0 votes
2 answers
38 views

Hide menu items from not logged in users

I have a theme which automatically adds all published pages to the menu. Is there a way to override this and add some of the pages only when the user is logged in? I thought maybe there is a filter ...
inf3rno's user avatar
  • 133
1 vote
0 answers
13 views

Custom filter not affecting gtag script position in WordPress footer

I am using a custom filter to place the gtag script in footer if it is applied in functions.php. The filter code is: if (apply_filters('myplugin_ga_script_position', $position = 'footer')) { ...
ahmedwp's user avatar
  • 21
1 vote
0 answers
9 views

can not serialize and insert data from custom form

I have a custom form . My form have three input fields book_name, chapter_title and chapter_content. chapter_title and chapter_content are dynamic form fields. I want to insert book_name as post_title ...
Khalid Saiffullah's user avatar
0 votes
0 answers
22 views

Translate string in another langage than Locale

I am developping a plugin for my company to register projects with some products. I am creating a purchase order for my supplier with this products. My local langage is french but my supplier is ...
mougeat's user avatar
0 votes
1 answer
14 views

Custom post type template not loading from plugin

I've created a custom post type called jdshs_jobs in a plugin and I have tried to get Wordpress to associate a template (single-jdshs_jobs.php) from within in sub-folder: .../plugins/plugin-name/...
Alex Adams's user avatar
2 votes
0 answers
29 views

Block Editor: Filter getSaveElement and innerBlocks

I'm the author of the Falang multilanguage plugin for wordpress (https://wordpress.org/plugins/falang/), trying to add a feature allowing site admins to translate their site from inside the gutenberg ...
sbouey's user avatar
  • 21
1 vote
1 answer
18 views

how to send csv file to other server using wp_remote_post?

I am facing issue while sending csv file to api. when i use simple php curl request it works fine for me and it sends the file to server. here is my php code $curl = curl_init(); curl_setopt_array( $...
wp_dev's user avatar
  • 11
0 votes
1 answer
22 views

How to generate frontend page with callback?

On the backend I can generate a backend page with add_menu_page and have a callback function which generates the page content. On the frontend I know only of wp_insert_post which can have a ...
inf3rno's user avatar
  • 133
1 vote
0 answers
19 views

Wordpress Plugin Update not working

I am facing an issue of update now button not showing up even if there is an update for a plugin. The following is the method that checks the updates for the plugin public function check_update( $...
ahmedwp's user avatar
  • 21
1 vote
0 answers
6 views

Help Needed: Issue with Change Permalink on DirectoryPress Listing Pages

I'm encountering a problem with a WordPress plugin I'm developing for DirectoryPress listing pages. The plugin aims to replace the default permalink with a new link specified by users in a custom ...
Xplosio's user avatar
  • 11
0 votes
1 answer
34 views

Where can I store data in Wordpress?

I made a pretty straightforward API something like $storage = new SettingsStorage($name, $schema); $form = new SettingsForm($storage, $action, $fields); $form->render(); I want to use the same ...
inf3rno's user avatar
  • 133
1 vote
0 answers
7 views

Add More Featured Data Not Sending to Database

I have made one form which is two step based. also i have added feature add more. So when you add click show same filed duplicate on step two. Problem---- When i'm trying to send data by (add more) ...
Atiq Rev's user avatar
0 votes
0 answers
15 views

How can we extent core/group or cover block?

I am working on a project and it has a requirement of adding separate background image for mobile devices. So is there any way that I can add InspectorControl on the core/group block for the mobile ...
up1512001's user avatar
1 vote
1 answer
31 views

Can we write custom DOM manipulation inside edit.js file while developing custom Gutenberg block?

I have doubts while creating a custom Gutenberg block are we allowed to directly manipulate DOM? Below is code that I have written in view.js file I want to know how much portion of this can be moved ...
up1512001's user avatar
0 votes
0 answers
13 views

How to change product SKU's in bulk with a plugin

Hey guys I have a Woo store where pretty much all my SKUs are wrong. I am trying to create a plugin to update all the SKU's in bulk but it is not working as should. Here is the code snippet: <?php ...
Alexander's user avatar
1 vote
1 answer
36 views

User set default settings for a Block in Site Editor

For a block I want the user to be able to set a couple of defaults for each newly generated block, think e.g colors and other attributes. Then every time a new block is created on the website, the ...
Sina's user avatar
  • 111
1 vote
1 answer
37 views

Can you nest columns/column in a gutenberg custom template?

I am trying to nest a core columns within a core/columns /core/column template. I keep getting an error that block can't render. However looking at my code it looks fine. [I've simplified the code] So,...
Dave B's user avatar
  • 25
0 votes
1 answer
43 views

Issue in Creating Dynamic URL in custom wordpress plugin

I am facing issues in creating dynamic URLs in my custom plugin, which uses an API to fetch details. Post Office by searching through pincodes and location names  Here is the URL: https://local....
Hemant Bindal's user avatar
1 vote
1 answer
11 views

Display box in sidebar of custom post type

I have a plugin I've written that displays ratings on various pages on my site. It's shortcode based and just drops in on any given page [mm-rating] It draws from a field provided by the WP SSO ...
commadelimited's user avatar
0 votes
0 answers
41 views

wp_add_inline_script vs wordpress fetch api

Inorder to pass some data from PHP to the javascript files, we can use either wp_add_inline_script or fetch api. Is there any condition, where each one of them is preferred over the other ? I have ...
Shadow's user avatar
  • 57
1 vote
0 answers
15 views

Wordpress Plugin, Elementor and the ReferenceError nightmare

I have a wordpress plugin for a third party site I run. I runs in conjunction with the standard text editor module used in pagebuilders (Beaver Builder, Divi, Elementor, etc), but for some reason, it'...
Ben J's user avatar
  • 11
0 votes
0 answers
21 views

Integrating Multiple WordPress Plugins into One Dashboard

I have created multiple plugins for WordPress, each with its own dashboard and slug, but with different settings. I am looking for some help and ideas on how to connect all of these plugins together ...
crazy trader's user avatar
0 votes
0 answers
9 views

Integrate a Custom Post Type with Learndash Plugin

I've registered a custom post type already in wordpress. I am looking for a solution to display that custom post type in learndash course Hierarchy.
Shaharyar Ansari's user avatar
1 vote
1 answer
69 views

Attributes array not saving values

I followed along with this stack overflow I got everything working except for the values saving in myTest attribute array. For some reason it's not and I've been stumped for over a week on it. Here is ...
Dave B's user avatar
  • 25
1 vote
0 answers
20 views

WP_List_Table sortable column with WC_Order_Query doesn't work

I've created a class that extend WP_List_table to manage WC orders in a plugin admin menu. public static function get_orders( $per_page = 5, $page_number = 1 ) { global $wpdb; $query = ...
Daniel Ringuet's user avatar
0 votes
0 answers
19 views

Add block templates (html) via plugin for custom post type

I'm writing a plugin that provides a custom post type. I am currently trying to create the block templates for the "single" and the "archive" associated with the custom post type ...
jshwlkr's user avatar
  • 512
0 votes
0 answers
13 views

Add File field in WooCommerce Box office plugin

I'm using WooCommerce Box Office plugin and I want to customize this plugin according to my requirements for example I want to add another field option called 'file' so user can upload files as well ...
M Sufyan Shaikh's user avatar
1 vote
1 answer
27 views

Ajax response from Media Selection does not update ALL information more than once

I don't quite know how to explain what is going on, or how to title my post but I'm going to do my best. I'm making my first plugin for WordPress, which is very simple. Allow the user to select a ...
level42's user avatar
  • 113
0 votes
1 answer
27 views

How to customize password reset message page on success if no error in password reset

I tried login_message filter with $_GET['action'] && resetpass but I want it on success password message page.
Wordpress developer's user avatar
0 votes
0 answers
19 views

Template locked block does not show appender

I have a parent block and a child block. When the parent block is chosen the child block should show the appender button so the user can click on it and choose any block. They should be able to delete ...
user10980228's user avatar
0 votes
1 answer
25 views

How can I catch WordPress custom settings page slug has already changed?

I created a custom settings page like below. add_menu_page( __('Management', 'domain'), __('Management', 'domain'), 'activate_plugins', 'management', // <--- ...
G.D.i's user avatar
  • 23
0 votes
0 answers
30 views

Plugin question, How to insert a colon in a value box

I would like to be able to insert a colon into my number box. In this case, I would like to put a colon between 15 and 1 instead of the decimal, since it is describing a ratio, but when I do this it ...
zshutoski's user avatar
0 votes
0 answers
16 views

Do uploaded files to /tmp/ get deleted in WordPress automatically?

I create a custom plugin with a upload file input in the admin area, my concern is, what happens to the file after upload? My concern is that the file that is going to be uploaded has sensitive ...
drshelloworld's user avatar
1 vote
2 answers
65 views

How to run this plugin every time a post is saved?

So far this is what I have... I'm new to developing plugins so I'm not sure how to make a plugin run code on a post save. I know that this would likely work if it was added to the post.php page but I ...
Cody King's user avatar
0 votes
1 answer
43 views

move useState variable from edit.js to save.js. How do I do that?

I want to move the useState variable selectedValue once it's defined in edit.js and import it into save.js. In edit. js the code looks like this import { __ } from '@wordpress/i18n'; import { ...
Dave B's user avatar
  • 25
0 votes
0 answers
39 views

JQuery UI Autocomplete showing as bullets

The JQuery UI Demo page for autocomplete has a nice looking search box and drop down. When I implement it in my plugin, I end up with a bulleted list. How do I get my drop down of suggestions to look ...
Tuba Saif's user avatar
0 votes
1 answer
108 views

Insert text programmatically in WordPress Gutenberg Editor

What's the correct way to insert text (or modify existing, selected text) in the Gutenberg rich text Editor? I have a button/menu choice added to the drop down menu to the right of the "Link"...
joho's user avatar
  • 53
0 votes
1 answer
52 views

wp_enqueue_script() with unknown path and maybe symlink

I'm developing a plugin that may also be used as a library in themes or plugins. I need to enqueue a custom script, but I cannot know the absolute path to the script, as the final location of the ...
Gerard Reches's user avatar

1
2 3 4 5
134