We’re rewarding the question askers & reputations are being recalculated! Read more.

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
0answers
13 views

Render a different post/template from within the template_include action?

I am working on a webinar plugin that uses a custom post type to display the webinar pages. Those pages could be register, thank you, countdown, live etc. depending on the visitors registration status ...
0
votes
0answers
12 views

Plugin callback page

I am trying to create a page in my plugin which will simply act as a callback page for oAuth. Following the advice on this article: - https://ieg.wnet.org/2015/08/using-oauth-in-wordpress-plugin-...
1
vote
0answers
14 views

Cannot search post by taxonomy

I'm trying to search posts by a taxonomy value, the problem is that the query doesn't return anything, this is my code so far: $args = array( 'post_type' => 'zoacres-property', '...
0
votes
1answer
20 views

How to add setting section in custom post type

can any one guide me how can I add setting section in custom post type for each new post. something like in the image. thanks.
0
votes
0answers
12 views

Wordpress Ajax not returning Response

I have an ajax call which is working perfectly but is not returning any response below is how i registered my scripts wp_enqueue_script('wcp-signup-custom-js', WCP_PLUGIN_URL . '/WCP/FrontEnd/...
0
votes
0answers
18 views

“Enable Media Replace” plugin does not update serialized object in WPMeta

We utilize WooCommerce and a WooCommerce plugin called Product Documents (https://woocommerce.com/products/product-documents/) to associate PDF media files with products in my online store. Our ...
0
votes
0answers
9 views

Wordpress Automatic Plugin Update Renames Plugin Directory

So I have hooked the wordpress plugin auto updated to effectively redirect my plugin to autoupdate from my own site rather than wordpress.com. The updating process works seemlessly aside from one ...
0
votes
0answers
9 views

How can I show the plugin to different user roles that was added under settings menu?

I am developing a plugin and its added under WordPress admin Settings Menu As we know without administrator role we can't see the all menus under settings menu, right? So, 1) Is it possible to ...
0
votes
1answer
21 views

ajax-action.php can't find added action

Dear fellow Wordpress plugin developers, I'm currently developing a WordPress custom booking plugin. In this plugin, I have added a calendar shortcode, which embeds an Html month calendar on the page....
0
votes
1answer
19 views

Check if someone is editing a post (this content is currently locked)

I'd like to create a kind of auditing. How can I check if an user is modifying an article? Is there a db query I can do to achieve this task? I've found the following solution but I wonder if there ...
0
votes
0answers
14 views

Where does get_post_types() get the data from?

I was going through the WP Core trying to understand how URLs are parsed to SQL query . So , I found in wp-includes/class-wp.php , in the method WP::parse_request() a call is made to get_post_types(); ...
1
vote
2answers
70 views

OOP Plugin Development. Including external object

I am developing a plugin by using classes and object oriented programming. Within my plugin I have included another object as I need to use the functionality of this other object. I am instantiating ...
0
votes
0answers
10 views

Update custom plugin using github repo

I've created a plugin that will add some custom shortcode to wordpress. I'm looking for a way to create an auto-updater that will rely on a github repo, this because I want to sell my plugin on a ...
0
votes
2answers
24 views

Is it necessary to auto delete my WP plugin database tables when users deactivate/delete my plugin?

Is it actually a necessity to auto delete all the corresponding table rows when users are attempting to delete my plugin? From my experience, I've encountered a few plugins where the db tables would ...
-1
votes
0answers
21 views

Build a plugin for send/receive WhatsApp messages, which API? [closed]

I saw many plugin for use WhatsApp with WordPress and I'd to try to build my own, but I can't find any free API or PHP library... How do WhatsApp plugin work? How do the officiale API work?
0
votes
0answers
19 views

Display attached images of a page or post that are insetred using gallery

I've finally added a custom metabox to link some images to some custom urls, (thanks to the Sally CJ for the help in troubleshooting my previous issue with adding a metabox), I need now to adapt this ...
0
votes
0answers
11 views

One time call to external API in widget

I want to make only one call to external API in the 'my_widget' class here is an example: class my_widget extends WP_Widget { public function __construct() { $args = array( '...
0
votes
0answers
5 views

Multi-level user group and role in Wordpress to create personal posts/contents?

I don't want to use any plugin to do this and write the functionality on my own. The client asked me to create a system with WP where a user as admin role (similar to CEO for example) will open ...
0
votes
0answers
17 views

How to add increase deacrese buttons into woocommerce product loop(shop page)?

I have added my buttons into woocommerce/templates/content-product.php <button type="button" class=" ajax_add_to_cart add_to_cart_button plus" data-product_id="274">+</button> <button ...
0
votes
1answer
15 views

overwrite wordpress gallery with custom gallery shortcode

I want to overwrite the default WordPress gallery shortcode with a custom one. This because I need to add a field that will contain an url for each image I want to add inside a gallery. I'm not sure ...
0
votes
0answers
11 views

how to make a plugin,which redirect go to the post instead of showing the option “View link”?

Plugin Development how to make a plugin,the function it will perform will be like when i will make a post and published it, it should redirect go to the post instead of showing the option "View link"?
0
votes
0answers
47 views

Add a custom link to each image in WordPress gallery

I need to add some partner logo images inside my custom theme. I'm using the WordPress gallery and the get_post_gallery() function to obtain the images URL that I will use to display the single logo ...
0
votes
1answer
29 views

Events Manager: Create custom Placeholder for use in Email notification

I have written a function (child-theme; functions.php) for the plugin Event-Manager in Wordpress. This function reads values out of custom input fields and saves those in the databse. I would like to ...
0
votes
0answers
28 views

when i activate my WordPress plugin cannot see customizer options or preview

I created a WordPress plugin but when i activate it my customizer and its preview stop working. I have attached a screenshot below. I have tried to increase my memory to 8000M but it wasn't useful. ...
1
vote
0answers
25 views

Incorporate small angular feature in my wordpress site

I want to add an angular feature in my wordpress site, but i m confused how to incorporate both. I m jus confused about folder structure for the same Or i can create a plugin?? My angular feature is ...
1
vote
1answer
25 views

How can I get the selected string when using a toolbar button in Gutenberg?

I have added a button to the Block Editor. Currently it adds a <span class="lqdnotes-blank-it"> before the selected text and </span> after it like so: <span class="lqdnotes-blank-it"&...
1
vote
0answers
30 views

Is nonce in PHP form and Ajax both necessary?

I have a php form which is submitted through jQuery Ajax. Previously i had used nonce with Ajax and PHP form seperately. Here i am using wp_nonce_field() in PHP form. Is it necessary to use ...
0
votes
0answers
7 views

How to customize woocommerce cart page and add variable product?

How can I achieve something like showing on picture? Here is the direct on of this website link-> https://vigoshop.pl/produkt/zegarek-inteligentny-vigo-premium-elegant/
0
votes
0answers
10 views

How to show variable products on cart page and make them clickable as it can added to the cart?

Please have a look at this site > https://vigoshop.pl/produkt/zegarek-inteligentny-vigo-premium-elegant/ and go to there cart page after adding this product to the cart. How they have achieve it?
0
votes
1answer
11 views

How do I find the page/url where a search came from when using pre_get_posts filter?

When I use pre_get_posts filter, I want to check what url/page the search query came from, but the $query var does not appear to contain that information. How do I retreive it in my function below? ...
0
votes
2answers
25 views

Unable to filter on field on edit.php page

I'm borrowing from the code at Add filter menu to admin list of posts (of custom type) to filter posts by custom field values to add a filter to my custom post type with the parse_query filter: ...
0
votes
1answer
25 views

Add column and post filter for a custom post type field on the edit.php page

I have a plugin that creates a custom post type that has a custom field generated with the plugin. The custom field is stored in the database as a meta key called status. The value of this meta key is ...
0
votes
0answers
16 views

Google Gtag or DataLayer Push not working within action hook

I used to use a function just fine but recently, perhaps because I corrected my implementation of Google Tag Manger and perhaps for other reason, I can't seem to use this code which is hooked to a ...
0
votes
1answer
32 views

Override class inside $atts shortcode_atts in WordPress

I have a plugin and I need to tweak one function. Specifically the 'class' => ''. This is the code in the plugin: function message_to( $atts, $content = null, $tag = '' ) { $atts = ...
0
votes
0answers
21 views

Detect if shipping method selected, country available

I'm developing a shipping method extension that is only available to a specific country. I already make the checks on "install" of the plugin but I want to be able to detect when the customer needs to ...
0
votes
1answer
11 views

Performance considerations - postmeta table versus new table for custom posts with foreign keys?

I am modifying a plugin that uses various custom posts types. The types are courses lessons topics At course, lesson, or topic level there can also be quizzes and assignments. ALso the ...
0
votes
0answers
20 views

Settings API issue with tabbed navigation

I've created a subpage of WooCommerce and I am trying to add tabbed navigation. The tabs work, but I can't get the fields setup properly so they display correctly. They all display regardless of my if ...
0
votes
1answer
8 views

My Wordpress Plugin code breaks customize.php viewpoint

I've been making a few tweaks to my plugin to try and get it back up and running with an upgraded API/backend. Sadly with my latest changes which commented out a few lines, I broke the backend view ...
0
votes
0answers
14 views

Variations is empty from object

I have a product with one variation and i need to get the sku of that variation. I'll have products with multiple variations but that part its ok if i can get the SKU of all. I havent tried to get the ...
0
votes
1answer
19 views

Loop in elementor custom widget not working

I have a custom made widget for elementor, but my problem is that my loop to get posts doesn't work properly. Currently, it returns the title of the page where the widget was inserted, doesn't show ...
0
votes
1answer
14 views

Updating transient value frequently

Is it alright conceptually to update transient value frequently. I am building up a login form & every time user enters invalid credentials, store the incorrect attempts. So I am using user IP ...
0
votes
0answers
24 views

WC REST API Error Handling

I am using the WooCommerce Rest API to query the products on a WooCommerce store. The Product ID ($id) is retrieved from the order line items. Some of the old orders in my database have products that ...
0
votes
1answer
23 views

WordPress custom post type capabilities issue

Using WP 5.2.4, I am registering my custom post type with this code: $args = array( 'labels' => $labels, 'public' => false, 'show_ui' => true, '...
0
votes
0answers
25 views

How to hide/remvoe unnecessary field/section in post edit section ( Dashboard )

I am trying fix some issue in wordpress dashboard. if you see the picture you will find that there are too many unnecessery field render in the post dashboard section, I have no idea how to remove ...
0
votes
1answer
15 views

Gutenberg blocks shortcodes compatibility

I have a custom plugin that will help me in building my layouts using bootstrap. I'm reading about the blocks that are part of the new Gutenberg editor. I want to understand if the shortcodes and ...
0
votes
2answers
23 views

Enqueue sripts and styles only if function is called

I'm using a function to display a gallery and I need to load its JS/CSS only if the gallery function is called. Both functions are in the custom plugin. I have now the first function to enqueue ...
0
votes
0answers
21 views

Save post as a draft if term of taxonomy not selected

I have a custom post type with metabox that contains form and few taxonomies in a side panel. Taxonomies are by default checkboxes, and at least one term of each taxonomy must be selected otherwise ...
0
votes
1answer
23 views

Fatal error: Uncaught Error: Using $this when not in object context

I am using a theme plugin that is essential for my theme. It is called PixGridder Pro. The developer website is down and they can't help me. The error given by wordress Fatal error: Uncaught Error: ...
2
votes
1answer
53 views

Gutenberg: useDispatch is not a function - @wordpress/data included

I have the @wordpress/data package installed, but I can't use useDispatch in my block edit function: const { registerBlockType } = wp.blocks; const { useDispatch, useSelect } = wp.data; . . . ...
-1
votes
0answers
15 views

Wordpress Websocket Live Chat Android Support

I want to create Live Chat in my wordpress website but i also want that live chat in android app as well. So i need Websocket on both sides. Can anyone suggest me a wordpress plugin that has exposed ...