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

Random string added end of the url blog page wordpress

https://demo.com/blog/page/2/?et_blog The random text appeared end of the URL I have to remove (?et_blog) that I am using Divi theme for WordPress.
1
vote
1answer
16 views

Issue with querying

I am having issues with my WordPress query. I am not the best coder at all, and I usually just get by learning here and there and editing/writing code as needed. I worked on a few things pretty much ...
4
votes
1answer
106 views

Why does WordPress create two transients with the same name when I specify timeout value?

Working with transients with a timeout, I seem to be getting two transients created, and I don't quite understand why. Looking at the source code on: https://developer.wordpress.org/reference/...
0
votes
1answer
21 views

I changed font of wordpress dashboard but it is slow!

my language is Persian and I wanted to change font of wordpress dashboard To be more pleasant. so I created a plugin that works easy. just changes the font of HTML elements of dashboard by CSS (font-...
0
votes
1answer
23 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, ...
1
vote
1answer
55 views

Programmatically detect if wp-cron is disabled?

I have a plugin that relies on WP-Cron to carry out background tasks. I want to warn the user the plugin will not work when it is disabled. Is it possible within a plugin to programmatically check if ...
0
votes
0answers
74 views

HTMLCollection not counting right in editor? / for loop not working on elements in DOM

I'm migrating my front-end code for a plugin to React and ESNext, and am still new to all of this, but for some reason, this really simple for loop isn't executing on the admin edit page, but is fine ...
0
votes
0answers
21 views

What to do with the .git folder in a WordPress plugin during local development

I'm developing a WordPress plugin. I have initialized git (git init) in my plugin folder. This created a hidden .git folder in the root directory. I have to test some functionality for which I have to ...
0
votes
2answers
54 views

Data not insert and update through ajax and jQuery in admin page?

I made custom plugin and done crud operation, display all data in admin page, used ajax and jquery. Data successfully deleted but not inserted or updated. Data successfully pass through ajax but not ...
0
votes
0answers
15 views

Wordpress Add Media problem with adding media description in wp_editor() when used in bootstrap modal

I am working in a plugin that uses wp_editor() for the text editor and has Add Media button. In my plugin, I have used bootstrap modal to popup a form with the text editor created using wp_editor(). ...
0
votes
1answer
375 views

How to change WooCommerce loop product title HTML output in single product page and archive page

I'm currently working on designing my custom WooCommerce theme and wondering how I could change the HTML output of loop_product_title in single product page and in archive pages. I have less knowledge ...
0
votes
0answers
8 views

page can't redirect in Faq custom plugin in admin page

I was trying to delete row in admin page for Faq custom plugin which I made. I made custom Faq plugin and connected it through database. Get all data on front-end and in admin page of plugin. I wanted ...
1
vote
2answers
16 views

Register a sidebar in a Wordpress plugin

We have developed a Wordpress plugin to create a reservation engine. We use a shortcode to build the checkout process. This shortcode creates html. We would like to define a sidebar in this generated ...
1
vote
0answers
16 views

Custom user login page by creating a plugin

I am creating a custom user interface (separate from the WordPress user system) that relies heavy on values from a mysql database. I have figured out how to access these values, and with PHP files ...
0
votes
1answer
97 views

How to add custom table style for table block in gutenberg editor

As per the image, I would like to add extra style for the table block.
0
votes
0answers
18 views

Getting wp_post objects from a single custom INNER JOIN SQL request

I have a custom plugin (written by me) that has, for reasons, got a custom table which contains a post_id field. It makes sense in context. What I currently do is SELECT post_id FROM table_name WHERE ...
1
vote
0answers
35 views

rewrite URL based on selected taxonomy for post page

I have a taxonomy called "group", and their values like "red", "blue", "green" (these are generating dynamic" no any fixed group value. during post ...
0
votes
0answers
16 views

Access remote SFTP server via Wordpress login?

I currently have an active Wordpress site and a running SFTP server that I manage locally. My Wordpress site is also hosted locally using LAMP. My question is if anyone knows of a way to integrate the ...
0
votes
1answer
49 views

register_meta not showing custom post type metabox data in rest api

I have added a custom post type and I want to expose the custom field value in the rest api. As per the docs register_meta can be used. I have created a custom post meta box using the wordpress way. ...
0
votes
1answer
44 views

Using AND and bracket grouping in SQL not working

I am trying to combine two conditions in a query but it isn't working. but running the conditions independently works. LEt me explain. When I run this query: SELECT DISTINCT SQL_CALC_FOUND_ROWS ...
0
votes
0answers
12 views

Make mobile urls different

My site amp url is different, AMP pages are like site.com/?amp i.e they have ?amp at the end... This is fine... But I also wants non amp URLs to be something like site.com/?nonamp i.e wanna add ?...
1
vote
1answer
49 views

Create a new post using rest api and save featured image using an external image url

I am trying to create a post using the rest API. Which I am able to do with a fetch request as below. OurPostData contains the title, content and URL of a featured image which is an external url ...
0
votes
0answers
18 views

add_settings_error() not shown and settings validation not working (settings api)

I have an options page which is not added under the "settings" section, but via add_menu_page()/add_submenu_page() This page contains of html markup for my settings and at the end <div ...
0
votes
1answer
33 views

Is it possible to convert various image types from remote URLs to WebP and then serve them immediately?

I am working on a plugin that gets image URLs from an API, some being PNG, JPG, and others JPG without an extension. I've been trying to use a combination of download_url() and media_handle_sideload() ...
0
votes
0answers
14 views

Update Block Attributes from Rest Api

I have created a REST API, which takes the parameter 'id' and returns the same value. Now what I want is to send this value to dynamic blocks that I've created. What I want to achieve is that if a ...
1
vote
0answers
14 views

Woocommerce - Convert Delivery method into a custom field

Woocommerce - Integration into Sage Accounts So currently we have available analysis field in sage, which means we can use customer fields in the basket to import into Sage Accounts, so for example ...
0
votes
2answers
230 views

Additional classes `undefined` after saving post in Gutenberg

The problem: whenever I type something in Advanced->Additional Classes in Gutenberg editor and save the page/post and refresh, those classes disappear. I logged props.className in edit function. It ...
0
votes
2answers
106 views

SMTP Error: Could not authenticate [closed]

In wordpress I am getting error SMTP Error: Could not authenticate. Here is the log file: Versions: WordPress: 5.6 WordPress MS: No PHP: 7.4.3 WP Mail SMTP: 2.5.1 Params: Mailer: smtp Constants: Yes ...
0
votes
1answer
14 views

How to add support for caching plugins for my own plugin?

Is there a generic way to support caching plugins? For example to set a flag after you update an option that caching plugins watch? For example WP Super Cache has this: function wp_cache_clear_cache() ...
0
votes
0answers
9 views

Need Help With Search Forms!

hi All how to create like this search form in wordpress?
0
votes
0answers
9 views

I cant show form value on widget section

I found a widget code that has repeater control and input gield on another question to make my own widget plugin.You can check the question: the answer from Sengngy Kouch . Is dynamic forms/entries ...
0
votes
0answers
22 views

Trying to rename a file upload as the hash of file content on wordpress

Trying to rename a file upload as the hash of file content on wordpress, not the file name as most tutorials are shown online. Which add_filter or how do I intercept the "content" of ...
0
votes
0answers
21 views

Adding the image selector/uploader to an admin back page

I have created a couple of back end pages for a client using a very basic database, the client is wanting to add an image url to the database but using the built in image selector/uploader, I have ...
0
votes
0answers
187 views

Fatal error “Call to undefined function is_plugin_active” each time the plugin is activated

I try to activate an extension in Wordpress, but I get an error every time I try to activate it: Here is the problematic code: function sta_pro_first_init(){ include dirname(__FILE__) . '/...
0
votes
1answer
24 views

Plugin Development using classes - Public & Private Callbacks

Alright, so I'm developing a plugin where my plugin file is a class which holds all the functions related to the initiation of the plugin, such that I can simply provide all of the plugins ...
0
votes
0answers
19 views

SEO friendly category listings

I am developing a plugin that has listing items. I've created a shortcode that lists all the items, but it has a categories dropdown. On dropdown change it should load a new page with only the ...
0
votes
2answers
25 views

AJAX form post returns 0

I am working on a simple plugin that shows an HTML form where the user can input a keyword which is used to query an external API. I currently have the form and the related jQuery set up, but when ...
0
votes
0answers
15 views

File is executed twice if plugin is activating

I have an issue with my plugin. I run an function if the plugin is activating this function include a file. But if I activate the plugin the file is included twice. Is this normal or an bug in ...
0
votes
0answers
16 views

User Role Hierarchy for Product Visibility

How to establish Product Visibility Hierarchy in Woocommerce? I have created Custom User Roles, extending Author Role as Importer/Manufacturer, Distribuitor and Retailer. I have enabled Authors for ...
1
vote
1answer
20 views

need to get user ID after a user logs in

currently running wordpress 5.6 Ive dabbled with PHP for a long time but new to modifying wordpress. Im ultimately looking to modify the database for a user right after a user logs in if certain ...
0
votes
0answers
37 views

The Build menu theme is frozen with the wordpress theme

I follow this video tutorial. I check my source code with the GitHub example and is similar in most part. That GitHub example theme named Aquila works on my WordPress install. My WordPress test area ...
0
votes
0answers
21 views

Gutenberg does not render changes in array of objects meta

A post has a meta value which contains array of objects. Seems like the values printed in a loop in fields do not render a changes unless I send a new meta key with dispatch. This does not work, If i ...
0
votes
1answer
47 views

How to write a custom shortcode name book?

<?php add_shortcode('Book','book_shortcode_templete'); function book_shortcode_templete($atts, $content) { $attributes = shortcode_atts( [ 'id' => 0, ...
0
votes
0answers
94 views

converting a node.js project into a wp plugin

What is the best way to take code written in node.js and convert it to a WP plug in without re-writing everything? Anyone have experience in doing this?
1
vote
0answers
17 views

Elementor custom Query with ACF fields to show matching woocommerce products custom fields

I am trying to show custom fields of some products using elementor custom query. The products are coming just fine. But they have usage custom fields matching custom conditions. Have a look at this ...
0
votes
0answers
10 views

Sidebar widget not partial refreshing for first widget on add and remove action

When you add the first widget in the sidebar it's a refreshing customizer completely and not partial refreshing. Go to Customizer Go to the Widgets panel. Remove all the widgets one by one. At the ...
0
votes
2answers
30 views

PHP can I add line numbers to file_get_contents()

I have a private custom plugin that I just use on my multiple sites, and since I do a lot of debugging I find it easier to include the wp-config.php file contents in the admin area to ensure I have ...
0
votes
0answers
12 views

WooCommerce Product - Custom data field not saving

Heyo! I'm working on adding a file upload in a custom tab of my WooCommerce products. I have a custom tab with a file input. I'm trying to save the file for use with another option, but when ...
1
vote
2answers
71 views

How to enqueue style in WordPress plugin from theme files?

In my theme files I enqueue many css and js files. I want to enqueue some css files which are same as theme. So, how I can enqueue in plugin ?
1
vote
1answer
76 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 ...

1
3 4
5
6 7
121