Skip to main content

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

How to create new title and its description inside a section in WP Customizer?

Actually, I want to add a new title General settings with a small text description of it in a new section that I've created in the WordPress Customizer. The section is already created and works well, ...
Sam94's user avatar
  • 13
0 votes
0 answers
4 views

Event when Modal is opened/visible

In my WordPress plugin, a Modal gets opened from within the Block Editor when a button is clicked. const MyContent = () => { const [isOpen, setOpen] = useState(false); const openModal = () =...
Abid's user avatar
  • 143
0 votes
1 answer
18 views

how to escape alert/window.location.replace with variable

I'm trying to write my first WordPress plugin and despite reading the documentation about escaping and reviewing other people's questions and answers I'm still not clear on how to do it in 2 cases the ...
Eitan's user avatar
  • 1
0 votes
0 answers
20 views

Why is my Gutenberg block not saving and rendering the chessboard?

I am building a Gutenberg block where the user will place the PGN code (chess game notation) inside the RichText field. On the frontend, the game's code will be embedded inside a chessboard library ...
JayDev95's user avatar
  • 179
0 votes
1 answer
28 views

How Can I Retrieve post ID in plugin file

I'm trying to create a plugin that will print the current custom post type for the currently viewed post type. the idea is that if a user visits one of my custom post types (products) they will be ...
rudtek's user avatar
  • 6,143
0 votes
0 answers
27 views

WordPress.Security.NonceVerification.Recommended

I am trying to program my first wordpress plugin. It works quite well so far, but I get some warnings when checking my plugin with Plugin Check (PCP). These are: Zeile Spalte Typ Code ...
DerWebfuchsde's user avatar
0 votes
0 answers
11 views

Unable to Edit or Add Photo Gallery Under Portfolio in WordPress 6.2.5

I'm experiencing an issue with editing or adding a photo gallery for our projects under the Portfolio section in WordPress 6.2.5. Details: WordPress Version: 6.2.5 Plugin Version: 1.8.58 (lightbox ...
Sarang's user avatar
  • 1
0 votes
1 answer
32 views

WordPress Plugin translation not working EN To FR

I'm creating a new plugin actually, the plugin is working perfectly, but it's not available yet in the wordpress.org website, I have an issue with the translation, I will not use wordpress.org for the ...
Sam94's user avatar
  • 13
0 votes
0 answers
16 views

2 Domains pointing to SIngle Wordpress , issues with links

I have two domains on wordpress site site1.mybusiness.com and www.site1.com The thing is i use this domain site1.mybusiness.com untill its fully operational witha ll plugins setip and site ready to go....
kgill's user avatar
  • 1
0 votes
1 answer
23 views

Is it possible to use Classes between WordPress plugins with separate namespaces?

I am currently learning how to create WordPress plugins using my basic knowledge of OOP and am a bit stumped on how I can use a class from one plugin inside another. Both of my plugins have unique ...
Simon's user avatar
  • 1
0 votes
0 answers
8 views

BBPress Customization with Custom Plugin

I have created a custom plugin, to do customization in BBPRESS templates, & Paid Membership Pro.. Everything other customization is working fine, But the template i want to show instead of bbpress ...
Monis Farooq's user avatar
0 votes
1 answer
12 views

Trying to Find the PHP File/Function that Handles a Specific Form Action URL

I am using a specific plugin that enables basic e-commerce functionality, and am attempting to extend the plugin functionality to include payment processing on the checkout page. The plugin itself has ...
Druid's user avatar
  • 1
0 votes
1 answer
35 views

Add an action only for a specific user in a plugin

I am trying to remove some of the dashboard sections from the left menu for everyone but one user. I have coded it like this: //Removes Meta Boxes from Posts Edit Page function rt_remove_meta_boxes() {...
rudtek's user avatar
  • 6,143
0 votes
0 answers
13 views

Query posts which are related via postmeta

I have two custom posts type: course and teacher. A course can be related to one or more teachers. Relations are postmeta containing teacher post id. I need to be able to filter courses list inside ...
Mauro Destro's user avatar
0 votes
0 answers
11 views

specific content for specific user in the control panel?

I have woocomerce website, and the website owner askd me to do this He want to sell training courses + the original products, and that is not an issue. The issue is he wants that: after the user order ...
Raied's user avatar
  • 1
0 votes
0 answers
25 views

How can I space out images when adding to a post without HTML/CSS/JS?

I use the classic editor and when I have a post with a very large number of images, it's very tedious to hit Enter after each one to space them out. Is there a way to do this automatically without ...
location's user avatar
0 votes
1 answer
31 views

How to be GDPR compliant by loading plugins?

As far as I understand I need a cookie consent before loading for example a Google Analytics plugin. Loading only a script file depending on user choice would be ok, because it is simple javascript, ...
inf3rno's user avatar
  • 135
0 votes
1 answer
12 views

How to apply a javascript code on certain parts of elementor made pages?

For example I have a simple animation which decreases the menu height and font-size while scrolling. <html> <head> <script> document.addEventListener("DOMContentLoaded", ...
inf3rno's user avatar
  • 135
0 votes
0 answers
20 views

Wordpress Playground and uploading permission issue

I've been testing the Wordpress Playground with my plugin. My plugin offers a way to upload a file to wp-content/uploads/ and it seems to work in the playground. $file_name = $file['name']; $temp_file ...
bestprogrammerintheworld's user avatar
0 votes
0 answers
24 views

Why WP CLI command is not visible in VIP CLI

I have registered the command like below and pushed this to VIP's development environment but when I try to execute this command from VIP CLI it throws an error. Note: on local this command is being ...
up1512001's user avatar
0 votes
0 answers
15 views

Google Books Lookup & Auto FIll

I need to create a Google Books lookup from my current form & Autofill book details in the same form. What i am developing is a Website where customers can sell their books listing on the site. ...
Jilina's user avatar
  • 1
0 votes
1 answer
20 views

Translations not making it into Block UI but work in the rest of the plugin

I'm currently flummoxed by a translation issue I've run into with a Block inside of my plugin. Both myself and the developer who did most of the work on the Block portions of the plugin have been ...
Jamie Poitra's user avatar
0 votes
2 answers
28 views

the function do_settings_section($page) generate error "Allowed memory size of ... bytes exhausted"

I'm creating a plugin to auto delete post/event. I created a WP settings page to manage the default settings for auto delete. I followed each step to register_setting, add_settings_field and ...
imagIne's user avatar
  • 83
1 vote
0 answers
13 views

Custom Plugin not Displaying in the Website Production environment (Divi)

I built a custom plugin for a website Using Divi and I am facing a problem right now getting it to display in the production environment of the website. Here are the details: Since you can't really ...
BrigantiumXIX's user avatar
0 votes
1 answer
19 views

Custom Plugin Breaks Other Plugin Functions

I wrote a custom plugin and when activated it breaks my ajax for wpdatatables. I have found that it is my CSS that is breaking this. How would I go about running the CSS code ONLY on that one page? &...
Diamond D's user avatar
1 vote
0 answers
18 views

Create child of child custom page in wp-admin

I'm creating a plugin with custom pages on wp-admin side. I have the main level page, which is actually just the menu and then child pages, which opens different pages. So far it's working as expected....
celsomtrindade's user avatar
0 votes
0 answers
39 views

How can I use the WordPress Settings API to create a settings page for my plugin?

I am currently developing a WordPress plugin called FlexiPress. I've created a settings page in the WordPress dashboard where users can configure various features of the plugin. I initially used a ...
Alexis Grolot WP Pro's user avatar
1 vote
0 answers
18 views

Is there a way to force plugins to use Flyway migrations for database changes?

Can I somehow force Wordpress plugins to output their required database changes as part of updates rather than let them change the database directly? Coming from Java Spring Boot development, one of ...
karmin-pho-er's user avatar
1 vote
1 answer
96 views

Output HTML Tags In Gutenberg Block

I've been working to update our custom gateway plugin to make use of the block checkout in WooCommerce. I have managed to get the gateway to output but one of the settings fields we have takes raw ...
Burgi's user avatar
  • 403
1 vote
1 answer
71 views

Gutenberg Static blocks: viewScript doesn't import css for frontend?

I am building static block slider (Swiper JS). Used wordpress/create-block https://developer.wordpress.org/block-editor/reference-guides/packages/packages-create-block/. Besides importing the JS & ...
Ion T's user avatar
  • 25
0 votes
0 answers
37 views

how to works woocommerce cart hash

have a WordPress store and I built it using the WooCommerce plugin. Today, I encountered an issue with my site that I need help resolving. The problem is as follows: Imagine a scenario where a logged-...
MahmoodZamaniNemati's user avatar
0 votes
1 answer
26 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
20 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
0 votes
0 answers
23 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
1 answer
27 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
  • 135
0 votes
0 answers
19 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
20 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
  • 135
0 votes
2 answers
21 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
10 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
24 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
  • 135
0 votes
2 answers
65 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
  • 135
1 vote
0 answers
14 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
11 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
25 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
38 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
3 votes
0 answers
39 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
  • 31
1 vote
1 answer
32 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
27 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
  • 135
1 vote
0 answers
24 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
9 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

1
2 3 4 5
134