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
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 ...
1 vote
1 answer
1k views

Disable woocommerce cookies and delete cart data automatically

I have a woocommerce website for some reasons I want to disable the cookies that saves the cart data if user closes his browser and come back to website after like an hour or 4 hours the cart needs to ...
0 votes
1 answer
13 views

How to move custom gutenberg block controls from settings to styles tab?

I'm writing custom Gutenberg blocks for my future projects. I have a few blocks and everyone of these has its own controls that allow change of border attributes, colors etc. All of these controls are ...
0 votes
1 answer
782 views

show wc_add notices on particular page in woo commerce custom plugin development

I am new WordPress plugin development. I am working on a plugin where I create a custom cart page like the woo commerce cart. And I add wc add notice when an item removes from the cart page it shows a ...
0 votes
3 answers
759 views

How to use $_GET function Wordpress backend

I use Plugin Boilerplate for my project. I searched the internet and read all the questions but I couldn’t find what I need. I also read the WordPress Codex. I think I couldn’t get the idea. I have ...
0 votes
0 answers
18 views

Update plugin from github

I'm working on a WordPress plugin hosted locally on GitHub, and it includes several addons. When updating a specific add-on, I want to ensure that the main plugin is of a particular version before ...
1 vote
2 answers
878 views

template_include filter does not render the custom template

I created a plugin that will render a shortcode that is entered to a page. This Shortcode shall override the theme's page template and use the one that I included on the plugin Here's my code: api....
1 vote
1 answer
7k views

403 error rest_'cookie_invalid_nonce' on API Request

I'm currently developing a Plugin in which I'm in need of retrieving information from a third-party plugin API. To authenticate my users, I am trying to use the vanilla authentication via cookie as ...
2 votes
1 answer
1k views

Saving data from block editor to the database

I'm developing a wordpress plugin and looking to save data entered in a block to a mySQL table. That's it. But how can data be sent from the block editor to the server side? I've spent two weeks ...
6 votes
1 answer
1k views

Show Similar Post Titles ( Similar to Stack Exchange )

I really like how Stack Exchange sites handle posts, where after you finish typing the title it will list out similar titles. How can I implement something similar on my WordPress installation? The ...
-1 votes
1 answer
27 views

Add taxonomy or category slug to custom post types URL

I have created a custom plugin that is similar to Woocommerce but will only manage products that are loaded using the WP REST API in a Vue SPA. I've registered two custom post types, one for products ...
0 votes
0 answers
12 views

Expose hidden custom post type

I use a plugin that generates some custom post types, such as 'ctp_1' ctp_2' etc... I also use a form plugin with a post management feature that allows me to either create or update posts throught ...
0 votes
0 answers
11 views

Implementation of a Download Wrapper

We have a number of static files (thousands) that are linked in WordPress from a post using Advanced Custom Fields and able to be downloaded. I am aware that this is insecure, but it is an inherited ...
-1 votes
0 answers
13 views

WooCommerce Plugin for min. order quantity [closed]

First of all, I'm sorry if there's a plugin like that and I wasn't able to find it, but I did my research and seems like I couldn't find a working solution for me. The scenario is following: I have a ...
0 votes
1 answer
10 views

audio tags no longer working

On my website, I had a plugin, that displayed a media tag like [audio src=path/file.mp3]. It returned this tag in the HTML retruned from the shortcode function. function init() { add_shortcode('...
1 vote
1 answer
1k views

wp_new_user_notifications to notify user and admin about new user registration

I am using wp_insert_user to insert new users and before inserting the user it checks whether the user exists or not and only the new user are registered. Now I want to notify both users and admins ...
0 votes
1 answer
31 views

Endpoint returning a 404

Hi I've built a wordpress plugin using a class. I'm sure all names (functies, urls, etc are correct. I'm trying to access my endpoint url using http://localhost/inschrijfmodule/wp-json/endpoint/...
0 votes
1 answer
1k views

Add a Script button in W3 Total Cache plugin not working due to conflicting jQuery version

While trying to fix the Render-Blocking issue on my website, I ran into a problem with the W3 Total Cache plugin on its Minify settings page. The two buttons to add JS (Add a script) and CSS (Add a ...
0 votes
1 answer
1k views

Update database record in plugin

I am developing a plugin now i want to update my table record.... I'm using this code to fetch data from database But i need to update data... also i am sending the screenshot of the database.... ...
4 votes
1 answer
952 views

Is their any way to Extend WPDB class and Overwrite the Default Query Function

I am trying to get the Query data with backtrace by extending the wpdb class and overwriting the Custom query function. The code is working fine if i Create a Symlink of db.php but is not working ...
6 votes
2 answers
5k views

Update Multiple Post Meta for the Same Post In One call?

How can I update multiple fields/Custom fields for the same post using only one call? Everything I came across are cases of multiple calls of "update_post_meta", for each of the fields. Is ...
0 votes
1 answer
1k views

How to change "Read More" text?

I'm using blogstart wordpress theme and I would like to change "Read more" text to something similar to language than I'm using. How can I do that? I already tried to paste code below to ...
0 votes
1 answer
16 views

Form submission issue in wordpress admin (custom plugin) using $_GET for searching & filtering

I have a custom plugin that was built by a developer which was working fine until last week Friday. The plugin is running on wordpress.com platform rather than a stand alone Wordpress.org CMS. An ...
0 votes
0 answers
342 views

how to check elementor is widget is active or loaded

I have create a custom widget for Elementor. I want to check with the code whether my widget is used or loaded (active) on the page or not? How can I do this? I want the styles related to the widget ...
0 votes
1 answer
2k views

Set _regular_price 0 if empty in woocommerce product [closed]

anyone suggest me a proper woo commerce filter for set _regular_price = '0' if empty ? i want to display 'Add to cart' button even after price is empty or zero for a product. Thank You
4 votes
2 answers
673 views

Wordpress scheduled task is called but not executed

I created a plugin with a cron to update all posts of a certain type every 5 minutes. I installed WP Crontrol to check if the cron is registered correctly and everything seems to be okay. This is how ...
1 vote
1 answer
28 views

Trouble with WordPress Settings API: Form Submits When Fields Called Directly, Fails When Using Callbacks

0 I'm working on a WordPress plugin and facing an issue with the Settings API. I have a settings page with two forms. The first form uses do_settings_sections() to call fields from a public function (...
0 votes
0 answers
9 views

My Wordpress plugin don't show the button on Gutenberg

I create the follow plugin to fullfill this: "Create wordpress plugin that does the following: Has a button that shows up in the Gutenberg editor for a post, in the sidebar, often referred to as ...
0 votes
0 answers
16 views

Control a Wordpress plugin auto-update rate time

I am writing a plugin, I want, in some cases, to tell WordPress to update that plugin, and that plugin only, immediately. I know that there is a transient called update_plugins that contains the ...
0 votes
1 answer
2k views

Checkbox field that add a subscription product and change prices of other products in checkout and cart page

In Woocommerce checkout section, I am trying to add a checkbox that adds an additional subscription product. It is working fine and I took help from here One more requirement is that if there are ...
3 votes
1 answer
696 views

Using the <MediaUpload /> component outside the editor. select('core') is null

I am using the WordPress components in the admin panel of my plugin and trying to make an image upload button. The button works fine and allows me to select an image, but when I select an image, I get ...
0 votes
0 answers
18 views

get_posts() return NULL using a custom plugin and add_submenu_page() with Post Type

Inside a custom plugin and using add_submenu_page() for custom post type I want to display one post. As the other post_type I use get_posts($the_id, $arr_params) to get information about it, except in ...
0 votes
1 answer
946 views

How to use setAttributes outside of the edit function return

This is probably as simple case of either not understanding JavaScript/ESNext scoping or function passing (or both), but, I can't get setAttributes to work outside of the primary "return" of ...
-1 votes
0 answers
11 views

I want students to be able to insert Mathematical notation for answer to QSM plugin question

I am creating a quiz using QSM plugin on wordpress. I have mathjax also loaded. I can i set you quiz so students can input Mathematical notation in their answers.
0 votes
1 answer
695 views

How to dynamically add template in Innerblock?

I am trying to dynamically add the template in my InnerBlock for that I have tried the following code: const edit = props => { var { className, attributes, ...
0 votes
1 answer
1k views

Add_menu_page and saving settings

I am working on an WP plugin and have my settings in a created menu page. When I save the page my settings are saved without any problems, but I don't return to the settings page but to a page where ...
0 votes
1 answer
782 views

Add an array as post content dynamically

I am working on a code where I need to insert the array as the content in wordpress admin . I am using below code $newArray = array(); $new_post = array( 'post_type'=>'post', '...
5 votes
3 answers
1k views

Making plugin unique to not conflict with plugins with the same name

I have plugin that has the same name as other plugin uploaded to wordpress.org How can i make it unique so it doesn't share "View Detais" link and auto-update with other plugin uploaded to wordpress....
0 votes
1 answer
753 views

wp meta_query meta_value compare =REGEXP delimited by space

searching for custom_tel inside custom post type for meta value example in database it is save like this 75213332 bla bla bla bla .. what i have done sent 75213332 and did REGEXP but that did ...
0 votes
1 answer
144 views

Creating posts with links from a txt file

I have a script which scrapes articles from the web and saves the url to a .txt file. I've created a custom plugin which on activation, loops through the urls and creates a draft post with the content ...
8 votes
1 answer
15k views

How to add Request header in WordPress remote api calls

Hey am new to WP development, can any one tell me how to add request headers in wp_remote_get() or wp_remote_post() remote api calls. I tried the following but didnt work $response = ...
0 votes
1 answer
34 views

Mixed results with is_page() WordPress function, when using $this, or self

I'm converting an old plugin from PHP5 -> PHP8 and I came across this check, which caused an error when executing: Notice: Accessing static property PropertySearch::$listing_details_template_name ...
0 votes
1 answer
909 views

wp_redirect on base wp-admin and login

UPDATE: I've done some more research on my problem and have narrowed down the problem further. The question below has been very rewritten from the original. I'm trying set up a plugin to redirect ALL ...
1 vote
0 answers
540 views

Python with wordpress plugin

I am trying to do some experiments with python and wordpress plugins. I would like to have shortcode [python] with some functionalities. I was trying this metod - Method i tried, but when I do ...
0 votes
0 answers
18 views

Woocommerce Payment Plugin with Mycred being the payment processor

some help please. I am trying to build a Woocommerce Payment Plugin with MyCred being the payment processor on another website. The mycred remote api is well configured, and I wrote the payment method ...
2 votes
1 answer
2k views

Does wp-cron runs all tasks scheduled at same time together or one after other?

I am developing a plugin and want to add a cron task(let's say cron_task_test) but have a doubt. In case 15 tasks(they may be scheduled by multiple plugins or the user himself) are scheduled to run at ...
0 votes
1 answer
893 views

Enqueue Script in custom plugin before other

I've got a conflict with another plugin which is blocking the JS in my custom plugin with the hook: add_action('wp_enqueue_scripts', '<FOREIGN-PLUGIN>'); Is there a way to enqueue my JS before ...
2 votes
1 answer
1k views

How can I get full attachment url from wp_get_attachment_metadata?

I want to get all sizes of an attachment. I can use wp_get_attachment_metadata to do this. But it only return filenames, not file urls. How can I do this? This is a workaround, but doesn't take ...
1 vote
1 answer
1k views

Is this best practice for Dynamically adding items to WordPress menus?

Is there an easier way too add this functionality to the menus page, instead of using the following code? Another words a different filter/hook/action that will make it, so I don't have to write ...
0 votes
2 answers
1k views

How to filter custom post data with AJAX?

I have build a custom post_type with "Resellers" in order to enter my personal reseller items. The "Resellers" post have taxonomies like "Countries" and "Departmens". I am running into a problem: ...

1
2 3 4 5
133