Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
6 views

woocommerce_order_status_completed Not being called

I have developed a custom plugin that is overall working great. No errors by WP or SQL problems as it access a custom database. BUT, for the life of me, I can not get the woocommerce call back to ...
0
votes
1answer
19 views

Return custom product in ajax call loop

Working on Wordpress / Woocommerce architecture, I'm new in woocommerce, before i've worked on django and laravel framework, the project is a plugin wp, where a little form is fit with select tags ...
0
votes
1answer
11 views

Plugin does not add action

I am new in Wordpress plugin development, and I wanted to create simple plugin, which will add 2 fields into General settings in Wordpress administration. I got following code (which works fine), from ...
1
vote
0answers
17 views

How to extend WooCommerce API to show bookable product availability rules?

I've made a custom plugin with a custom API end point. I would like to access my bookable products availability times so I can use the API with a react front end. So far I have this function that ...
0
votes
1answer
14 views

How to create custom embed block in gutenberg wordpress

Can someone please help me out here. How can i create a custom embed block in WordPress(Gutenberg blocks), the block should ask the user the URL of the video to embed and some few options like auto ...
0
votes
0answers
6 views

How to customize Order tracking fields in woocomerce Order Management Plugin

I am Creating An Service based Website Where user has to Place Order by Entering Item Identification code. To Track the Service Status of Same Asset, I want the user to enter the Same Identification ...
0
votes
1answer
24 views

Author Meta in Author URL Link

I am trying to modify the default author link url structure. In the URL, I would also like to change the string author to operator add some author meta along with the username. So far, I have ...
0
votes
1answer
35 views

Need help with format of nested array in MySQL

I build a plugin, that is able to run through a CSV file and parse the variables into custom fields of a custom post. In my custom post type, I build a meta box with repeatable custom fields. The ...
0
votes
0answers
21 views

Same height on items in columns block (align-item stretch or other method)

I am building a small plugin to make it possible to add bootstrap cards as custom blocks. This works great in general. Now i'm working on their css and have an issue with alignment. I would like the ...
0
votes
1answer
10 views

Hook to display element as product on category page

I am creating a plugin and I am trying to add an element which will be displayed as a product. In the picture, the element is the red rectangle. I have used this guide but none of the hooks there ...
0
votes
1answer
23 views

Share functions between admin and frontend

I'm new to OOPs. I'm building a Plugin and I started with the "Wordpress Plugin Boilerplate with Namespace and AutoLoader Support." I've even successfully added a section for a RESTful interface that ...
0
votes
0answers
16 views

Editor Plugin - Breaks when toggling between Visual to Text

I've developed a plugin that inserts shortcode, now I want to reverse the process. I've got it to find and replace the shortcode with an image. I've got it so when you hover over the image it puts an ...
0
votes
1answer
29 views

Ajax is not working in a loop

I am trying to show data associated with selected categories by using ajax. Its working only for the last term selected, not for all the selected terms. Any help would be highly appreciated. var ...
-1
votes
0answers
14 views

load more button in plugin

I wrote a simple plugin which creates a post type named cryptoevent and also creates a metabox that have some custom fields, I display this post type and fields with WP_Query, now I want to display ...
0
votes
1answer
5 views

Change Portfolio to show all same size grid?

Currently I am editting a website, I need the portfolio section to show all the same size images rather than it showing a long rectangle on the 2nd column. I thought it would be able to be fixed in ...
0
votes
1answer
30 views

Woocommerce Single Product Tabs Got Duplicate

I have just change the order of these lines of code for some changing in single product template. add_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 10 ); ...
0
votes
0answers
24 views

How do I save values from a foreach output on an options page?

I am creating a plugin that outputs a metabox on each page to be able to assign custom meta descriptions plus some other values. All of that works perfectly. However, I also have a "bulk editor" ...
0
votes
1answer
40 views

Make a list with header and subtext in Gutenberg blocks

I want to create a block in the gutenberg editor, to create lists with a header and subtext (interview format with question and answer). The list should be in an ordered list. I can't figure out how ...
-1
votes
0answers
23 views

shortcode being fired when saving post

I am having trouble with short code being executed when a post is saving. I have stripped everything down to the bare minimum and am still having the issue. Also, and it might be related, is_admin() ...
0
votes
0answers
18 views

How to Customize Widgets based on User Role? [on hold]

I have a WordPress website and I have custom User Role called "AdsUsers" this created for users that have permissions to manage the Ads Widgets that located on the sidebar, but as you know the ...
0
votes
0answers
20 views

Replace the WordPress Media Library Uploader

I would like to replace the WordPress Media Library Uploader within the admin section to use Filepond. Server Documentation is here plugin.php add_action( 'wp_enqueue_scripts', function() { // ...
0
votes
0answers
13 views

Update checkbox value from clicking button

I have a CPT and in the columns section, there is a button. I have a checkbox in my custom meta box and it is hidden. But when the checkbox has been clicked the text of the button and color will be ...
0
votes
0answers
20 views

Gutenberg: Dynamic Block - Show saved data in the editor

Im trying to create a Gutenberg dynamic block with dropdown list. I have completed block creation and rendering the block with selected dropdown value in the frontend. How to set the dropdown ...
0
votes
1answer
26 views

Built a second plugin but it overwrote the first one

I built a WordPress plugin following Alessandro Castellani's tutorials with no problem. However, when I built a second plugin and activate it, for some reason it overwrites the first one. In the ...
0
votes
0answers
19 views

Show Post columns to specific users on condition

I have a CPT called Topics. And admin or editor can only make topics and It can be assigned to authors. I have a meta box where there will be a list of authors and Admin/Editor can choose whom to ...
0
votes
1answer
21 views

WordPress gtag.js with User ID tracking

StackExchange, I am currently creating a website and wish to implement google analytics on it. I am using the new gtag.js and also want to include user id tracking. I've had a little python experience ...
1
vote
1answer
60 views

How to call function at the bottom of post using plugin?

I am creating a plugin and need to write a function which will invoke at the bottom of posts. Currently, I have a shortcode created and I'm calling the shortcode at bottom of each post wherever ...
0
votes
0answers
16 views

Custom preview_post_link not working for draft post

I am trying to change the functionality of the preview button so the URL can be changed to the address I want. I am using the code below function preview_link_fix( $preview_link ){ $mydomain = '...
0
votes
0answers
17 views

How to prevent users from deleting their accounts?

I'd like to prevent user from deleting his/her account. This is mainly because of our internal rules requiring either two users being deleted at once or none at all. The only way to delete accounts ...
0
votes
1answer
12 views

Function settings_fields() not recognized (Uncaught Error: Call to undefined function settings_fields())

Im developing my first plugin, and the wordpress shows the following error when I try to access to the wp-admin: Fatal error: Uncaught Error: Call to undefined function settings_fields() in .../...
0
votes
1answer
30 views

I want to display the content of a text field only if it has been entered

I need a little help with my very first plugin. It's not that big a plugin and consists of a small settings page with 3 text fields that display on the woocommerce checkout page with some css. I'm ...
0
votes
1answer
17 views

Can't upload CSV file to plugin directory using custom upload form in admin panel

I need some assistance here. So far, i build a plugin, that are able to import data of a CSV file and parse it into fields of a custom post type. At this point, I would like to make a form to ...
0
votes
1answer
17 views

Performing ajax request in wordpress

I am trying to perform ajax request in my plugin. What I have done is: Class Someclass { public function __construct(){ } public function current_page_function(){ ...
0
votes
0answers
9 views

How do I get a reference to the HTML memory buffer while the page is being constructed?

I want to view & update the buffer with html "<head>" data section in it, after the head has been generated. Problem statement: I have created some shortcodes in a plug-in which, if ...
1
vote
1answer
14 views

Where (or when) should I register a new taxonomy?

I'm writing a plugin and my question is: Which is the most suitable point in which to place the code to register a custom_post_type, or a taxonomy: "init action", or "activation_hook" ??? 1)...
0
votes
0answers
8 views

Ajax Search for Post titles Backend

I was making a plugin for my company and they have a weird demand. So, how can we do live search at the backend (not frontend) for all the topics? What I want is when someone types a word at Title ...
0
votes
0answers
16 views

do_action from within a class does not seem to work

I have a class within a plugin which is loaded via the below code: <?php add_action( 'plugins_loaded', array ( 'Company_Store_Locator', 'init' ) ); class Company_Store_Locator{ public ...
0
votes
1answer
11 views

Call do_action() within WordPress cronjob

I've programmed a cronjob in WordPress which get's executed every 5 minutes. In the function of the cronjob im trying to perform a do_action: error_log('Send Email'); do_action( '...
0
votes
0answers
12 views

Creating a form and submitting?

First, I don't know what I am doing and learning. We use Amazon Workspaces on zero clients, which doesn't offer a user ability to restart their machine. The AWS console allows me to reboot users ...
0
votes
0answers
20 views

Wordpress Product Detail and catalog

I want to have post for every product, some product may have similar feature.For example Size with different Value for each one. and some other product doesn't have Size Feature. i see this page and ...
0
votes
0answers
19 views

How to create save function for custom Gutenberg style block?

I need to create an extra style for WP Gutenberg Gallery block with a custom look and feel for front-end. I'm trying to create custom style using wp.blocks.registerBlockStyle(). But for my goal, I ...
1
vote
2answers
21 views

Adding Meta Boxes while Registering a Post Type in a Class

I am trying to add a few meta boxes for a Custom Post Type through a Class. I am using the "register_meta_box_cb" parameter while registering the Custom Post Type to specify the callback function for ...
0
votes
0answers
20 views

Custom Plugin used for creating widget feat ACF

I'm building a plugin that it needs to create a widget with some custom fields. I'm not an expert, this is my first plugin, but I'm interested to learn on how to develop more plugins. My problem is ...
0
votes
2answers
20 views

Warning: Illegal string offset 'Andorra' in … on line 106

Complete Code. // Set UI labels for Custom Post Type $labels = array( 'name' => _x( 'Events', 'evn_calendar'), 'singular_name' => _x( 'events', 'evn_calendar'), 'menu_name' ...
0
votes
2answers
57 views

Permalinks: custom post type -> custom taxonomy -> custom sub taxonomy -> post

I am building a custom post type and its respective custom taxonomy. Here is the code: add_action( 'init', 'register_my_types' ); function register_my_types() { register_post_type( 'help', ...
0
votes
2answers
36 views

Bootstrap version conflict 3 with 4 for wordpress theme and plugin

I've developed One new wordpress plugin, using Latest Bootstrap (4) and latest FontAwesome (5) version. Is now looking good. All design is complete. Now When I install this plug-in with another ...
1
vote
1answer
21 views

Define a wordpress constant through plugin functions?

I'm working on a plugin and trying to build in an option to disable post revisions. I have the setting registered, and confirmed that the checkbox is linking to the database. The option value is ...
0
votes
1answer
31 views

Woocommerce product not appearing in category list page when created programatically [closed]

I am creating a plugin that will filter the products from API to our WordPress site. I did successfully created the product and automatically publish it with category and subcategory in it. http://...
0
votes
1answer
18 views

Creating a functionality plugin to edit seriously simple podcasting

I have made the following change to the below file in Seriously Simple Podcasting Plugin: /wp-content/plugins/seriously-simple-podcasting/templates/feed-podcast.php The full file can be found here:...
0
votes
0answers
12 views

using jquery events from wordpress frontend

i have used jquery on my plugin for events and ajax calls to consume rest apis but when i tried using events(click,hover...) but when i tried using it for front-end it is not working ,jquery works ...