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
2 answers
185 views

Add custom CSS for plugin admin Page

I am trying to add custom CSS for plugin admin Page. If I use below code then it is working. wp_enqueue_style( 'cricket-info-admin-styles', plugins_url('') . '/wp-cricket-info/assets/css/admin_styles....
abu abu's user avatar
  • 183
0 votes
0 answers
41 views

How to add image in wordpress custom plugin?

I am looking for how to add images in a custom database table using WordPress code I am new in WordPress plugin development. I've created code for a plugin named store plugin. I've taken fields like ...
Khushbu Joshi's user avatar
0 votes
1 answer
56 views

How to make Wordpress Plugin run on single specific Admin Page

I've written a plugin and it has regular functions and a few class functions. At the end of the class function I have a line that runs the class like this: $the_function = new the_function(); The ...
Angel Hess's user avatar
0 votes
0 answers
17 views

Customize product card Up-sell on Woocomerce

I changed the product cards to also show the category and short description of the product but I can't show it in up-sell products. this is the code i used function category_single_product(){ $...
LesCa's user avatar
  • 21
1 vote
0 answers
17 views

How to load different layouts to display the $post_output in a plugin?

I want to give different layout options to display the card block(Class="card"). I want to create style1.php, style2.php as different styles that will have different layouts and call them in ...
Mangesh Yadav's user avatar
0 votes
0 answers
84 views

Woocommerce Reviews tab not showing on single product page

On the website sagajackets.com, the Woocommerce Reviews tab is not visible on individual product pages. The website is currently using the Shoptimizer theme. To address this issue, the website owner ...
Aadii Mughal's user avatar
0 votes
1 answer
88 views

Custom Gutenberg Block 'Stylized List' - Incorrect Rendering and Looping of List Items

Description: I have developed a custom block called 'Stylized List' for the WordPress block editor (Gutenberg) that allows users to create advanced styled lists with customizable titles, items, and ...
Md.Mehedi hasan's user avatar
1 vote
1 answer
15 views

Resending woo-commerce order emails from frontend

I am trying to create a simple shortcode [resend_woo_emails]. This shortcode will create a form with a dropdown with all email classes, an input field for cc emails, and another input field for ...
Joy's user avatar
  • 31
1 vote
2 answers
692 views

WordPress - Custom permalinks for advanced custom fields (ACF) using post type taxonomy

I am trying to update the URL structure for posts within a custom post type. I would like the url to use the taxonomy slug from the "resource-topic" taxonomy, and not the custom post type ...
user2748363's user avatar
0 votes
0 answers
9 views

WordPress Custom rewrite does not work with seo url

I try to generate 3 custom rewrite rule, it does not really work very well. Here is my plugin class file. <?php class QuestionAndAnswers { public $isUserLoggedIn; public function ...
Fatih Toprak's user avatar
0 votes
0 answers
13 views

How to add "Leave a Comment" link or button at the bottom of each post in the "Latest Posts" block?

I have been digging around in WordPress developer resources to see if I can figure out how to add "Leave a Comment" link or button at the bottom of each post in the "Latest Posts" ...
bistromatic's user avatar
0 votes
0 answers
33 views

Rebuild Core Block as Separate Plugin

My goal is to create a new "custom paragraph" block based on the core/paragraph block but I would like to remove the text/background color options as well as the margin and padding options. ...
dancingrobots's user avatar
0 votes
1 answer
69 views

Why is there a bunch of WordPress HTML code in my browser CSV download?

I'm trying to add a button/link to an existing WordPress page to allow downloading a dynamically created CSV file. The contents of the CSV file are retrieved from the WordPress database. Unfortunately ...
bistromatic's user avatar
0 votes
1 answer
92 views

Wordpress site server getting blocked due to resource abuse

I have a very weird problem going on. Namecheap always blocked my server by sayings I am overusing resource allocation. It’s hard to figure out what plugins or files are creating problems. I need to ...
LearningROR's user avatar
0 votes
1 answer
21 views

Get logged in user with - custom plugin

I am writing my own plugin and I am stuck quite early on. I am trying to get the ID of currently logged in user, via php script. Something like this add_action('init','do_stuff'); function do_stuff(){ ...
Aljaz Jelen's user avatar
1 vote
1 answer
35 views

'global' not working when passing variable from plugin file to template

I have a custom plugin file that contains a function to generate a string upon the firing of a 3rd-party plugin hook. I want to echo this string in a custom template file — how do I give the template ...
Atiksh Gupta's user avatar
0 votes
1 answer
39 views

I want to create a search option for CPT using plugin. The search options should search for categories and tags

I want to create a search option for CPT using a plugin. Currently, the plugin displays data from the CPT posts using custom Gutenberg blocks. I am also able to display all post lists. I need to ...
Mangesh Yadav's user avatar
1 vote
0 answers
31 views

configure additonal build files in the @wordpress/create-block

I'm using the @wordpress/create-block package to create my block plugin. It comes with preconfigured webpack settings to build all the assets. By default as js in the src/ folder is built in the build/...
Will Honeywill's user avatar
1 vote
0 answers
318 views

useBlockProps() nests wrapper with class name inside block wrapper in the editor

I'm trying to add a tailwind class to the block wrapper of a custom block I'm developing. However, useBlockProps({className: 'h-full'}) generates an additional wrapper with the tailwind class name ...
Gayle F.'s user avatar
0 votes
0 answers
55 views

Cannot call a class as a function in block plugin react component

I'm developing a block plugin and working with the React packages for WordPress. In my Save function I'm trying to load a slider component from the package ['react-slick'] (https://github.com/akiran/...
Will Honeywill's user avatar
0 votes
0 answers
21 views

Is there a wrapper to develop a plugin for WordPress and Prestashop in generic code?

I'm looking for a wrapper or other tool that lets me develop a plugin for both WordPress and Prestashop in one go. So that I can write generic code to create a page, and have hooks to run on page load ...
Lode's user avatar
  • 101
0 votes
1 answer
96 views

Remove H1 title in admin post edit screen

As a priority i need to just display some custom html inside the Title(h1.wp-heading-inline) in the Post Edit Screen (Top Left Corner). While trying various methods i found that all html is filtered ...
Ion T's user avatar
  • 15
2 votes
1 answer
77 views

Is It Possible to Use the Block Editor’s Notification Feature to Send Another Notification After the Post Is Saved?

I have custom fields added to a custom post and I'm using the block editor to edit the custom posts. I'm saving the custom fields separately when the user hits the Update button. The block editor ...
Samuel Bacay's user avatar
1 vote
1 answer
90 views

Wordpress custom block error: Content generated by `save` function triples

The block itself works fine. The problem is when the post is edited again - the block gives a "This block contains unexpected or invalid content" message. Developer console shows the ...
budgiebeaks's user avatar
1 vote
1 answer
450 views

Warning "Attempt to read property 'feeds' on null" using post update function

Working on own plugin for WordPress have a page where I need to update post object. But after excuting command wp_update_post I have an error Warning: Attempt to read property "feeds" on ...
OLA's user avatar
  • 13
0 votes
0 answers
75 views

Loop through Redux option framework repeater field

I am using Repeater field of Redux Framework in WordPress. I have created the repeater field and assigned the data. Now I am trying to display those data in front end. But I am not getting how can I ...
Milan Bastola's user avatar
0 votes
1 answer
152 views

Does it make sense to sanitize the output of an SVG file?

I'm developing a plugin. In its settings page I want to use SVG icons. This is how I render SVG icons: <div class="svg-wrap"> <?php echo file_get_contents(ABSPATH . 'wp-content/...
Megumi's user avatar
  • 1
0 votes
0 answers
69 views

Display Any Field fromAdmin Panel in Frontend via Shortcode?

Frontend Admin by DynamiApps allows you to display/embed any ACF field in frontend. What is the best process to replicate this concept to display any field from any admin page in front end? i.e, We ...
1000K's user avatar
  • 1
1 vote
0 answers
44 views

Detect if user is on the specific page in WordPress

I have my WordPress plugin, it does not use post types so I cannot make use of wp_check_post_lock and similar. I have plugin menu which leads to (for example): http://localhost/xampp/wp/wp-admin/admin....
Toniq's user avatar
  • 437
0 votes
0 answers
27 views

Display file contents within Plugin

Does anyone know what I am doing wrong - I try to display forms from different files within my plugin. all is triggerd by my_shortcode where the via $atts the user choses which form to display. This ...
gladys's user avatar
  • 11
0 votes
0 answers
178 views

Validate a custom form with js and php

I would please need help with the following: I have a form in my WP Plugin, that is validated with js, which works fine, Then I want to validate it using php, display the errors on the form and after ...
gladys's user avatar
  • 11
1 vote
1 answer
189 views

Set srcset on a block image

I'm trying to set the srcset property of a block image. I'm replacing the image with another one and I noticed the attribute srcset is not being set, so I'm trying this with no success: wp.data....
Alvaro's user avatar
  • 121
0 votes
0 answers
31 views

Custom plug-in issues

I wrote a custom plug-in (leaderboard plug-in) to work with my existing plug-in (Clan Wars plug-in) on my website (AllClanBattles.com). I want to be able to take all the existing teams on my website ...
user10212870's user avatar
0 votes
1 answer
37 views

multiple record insert creating many duplicate records

I want to loop over an array and store the records in the database. This is working but for some reason it is creating 30 odd records instead of just 4. I put this code into a very basic custom plugin ...
user8463989's user avatar
0 votes
0 answers
19 views

WordPress Cron Job not importing products

I think this issue is related to WordPres Cron System , because the function runs fine without cron but it doesn't work as expected when run via cron , please have a look : https://wordpress.org/...
rawaha johns's user avatar
0 votes
0 answers
485 views

403 forbidden error in the admin panel as well as on the admin-ajax.php file

I am using WordPress, My website was working perfectly until I changed the file permission. admin-ajax.php is showing 403 forbidden error and the rest of the file is working. due to a 403 error, My ...
Naren Verma's user avatar
0 votes
1 answer
166 views

Accessing Correct Database to Create REST API Endpoint

So I have multiple databases associated with the database where my wordpress website is hosted. I was wondering if I can access all of said databases with $wpdb or will I need to initiate a connection ...
oin's user avatar
  • 1
0 votes
0 answers
10 views

Custom Sort of Custom Post Type Breaks Admin Functions

This is linked to a previous question here: https://stackoverflow.com/questions/76095044/re-ordering-a-custom-post-type-query-performed-by-directorist-plugin/76095177#76095177 I am using a listing ...
MrChoop's user avatar
0 votes
0 answers
117 views

How to detect when the user clicks the publish/update button in Gutenberg Editor

I'm currently new to the Gutenberg block development. I was wondering if there is a way to detect when the user clicks the publish/update button? Reason for this is that i need to call a custom ...
randyk69's user avatar
0 votes
0 answers
29 views

WordPress Admin panel: Custom submit button, need to suppress JS refresh dialog popup warning

Question: Is it possible to remove the WP admin dialog popup when using a custom "publish" button? Consider this workflow: Custom post type that a special editor role [approver] will simply &...
Christian Žagarskas's user avatar
0 votes
0 answers
11 views

how to decrease the size of wordpress site after installing the wordfence

Recently i had a malicious attack on my wordpress website through the EA for elementor , after that i downloaded some plugins for security and monitoring activity , like activity log for logs and ...
Prince Bhati's user avatar
0 votes
1 answer
93 views

Is it smart to require_once wp-admin/includes/plugin.php when you need only one function from it

This question is loosely related to Why some plugins are including wp-includes/plugin.php file? What I'm trying to figure out is, when is it smart to include this file, and when isn't it? I'm building ...
Daan van den Bergh's user avatar
0 votes
1 answer
53 views

WordPress custom block: Link saved in database not retrieved when editing post

I'm creating my first custom block for wordpress which must add two buttons and I need to insert the link of the two buttons. But after updating the post the link is saved, however if I enter the post ...
1001Songs Clips's user avatar
0 votes
1 answer
115 views

Remove Gutenberg Buttons Block

Is there a way to remove the default core/buttons block in Gutenberg, or other various blocks? We're creating our own buttons block and don't want the user to get it confused with the default one and ...
null's user avatar
  • 101
1 vote
1 answer
391 views

Allow manage_options capability for specific user only for specific plugin?

So typically, most plugins require the manage_options capability to access their options pages. Some plugins offer a hook that allows you to assign a custom capability that will grant a user access ...
jsherk's user avatar
  • 187
0 votes
1 answer
123 views

High-Performance Order Storage conflict action `manage_shop_order_posts_custom_column`

I use this to add an Ordered Products column right after the Date column (fits nicely there). Each product is also linked to it's proper edit page. Look like this: This is my code to do this: // -----...
vanloc's user avatar
  • 125
0 votes
1 answer
20 views

select rows based on exact time (hours, minutes and seconds)

I want to update my wordpress posts based on exact time including hours, minutes and seconds, I tried the simple where clause, it seems ignoring the minutes and seconds, here is my simple query: $date ...
Bill's user avatar
  • 31
0 votes
1 answer
48 views

Wordpress wp_set_object_terms does not assign product to custom taxonomy

I have create a custom taxonomy called regions with acf. and have create also a select option on dokan multivendor dashboard where they can create new product <?php $regions = get_terms([ '...
tilamap365's user avatar
0 votes
0 answers
67 views

Extend backbone for add new custom Rest Api

I would like to know how i can extend the backbone from wordpress to be able to add custom rest api? I have created a wp-extend-core/v2/themes-generated endpoint, and to be able to use it in admin I ...
Blaga Vasile-Alexandru's user avatar
0 votes
1 answer
28 views

How to provide page_template path in custom plugin using WordPress

How we can provide page_template path in custom plugin using WordPress? I given a path in page_template='templatepage/checkoutpage.php' as array of post.Inserting post data by wp_insertpost() function....
Mallesh's user avatar