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
1answer
21 views

Can't print Yoast meta description into page template (syntax error, unexpected '.')

Here is the relevant portion of my page template code: $yoast_meta = get_post_meta($post->ID, '_yoast_wpseo_metadesc', true); function my_service_template_footer_data() { echo "<script ...
0
votes
0answers
12 views

How to create a single admin_notice that can be dismissed (and stays gone)?

I found this tutorial thinking it might do the trick. So I created the following files and placed in a /notice/ subfolder of the plugin: dismissable.php update-notice.php update-option.php /js/...
0
votes
1answer
34 views

Why are custom taxonomies only appearing on the edit page of one of these types, but not the other?

So here's an odd one. I have custom taxonomies that show on the admin menu of both post types they're associated with, but only one of the post types shows them in its edit menu. (Over on the side of ...
0
votes
1answer
12 views

Using ACF default value to autoincrement a number field

I am trying to create a field called "numero" as an auto increment field with advanced custom fields. This function with WP_Query returns the last inserted "numero". function ...
0
votes
0answers
13 views

How can I add Google autocomplete field in quick edit section for a custom taxonomy? [closed]

I have a custom taxonomy and the screenshot https://nimb.ws/4VK9gF is specified where I added the custom field Address. So now I want to this textbox works as a google map autocomplete field. In this ...
0
votes
0answers
20 views

Adding the picture as a download [woo]

I'm looking for a hook, corresponding to event "creation of product" to make able set the download from product image to already set downloadable product. To the moment my plugin is ...
0
votes
1answer
15 views

How does update method in Widget class saves $instance array from Select tag?

Following a tutorial and it works fine. I just can't understand how update method saves $instance array in the database from Select tag? You can choose default or full, slick save in the admin area ...
0
votes
0answers
17 views

Add action wp_footer in define_public_hooks for plugin development

I'm trying to add some code that creates a cookie banner for my plugin after the footer. This is the code I use inside the "define_public_hooks" function in the PHP classes file inside the &...
0
votes
0answers
20 views

Using sessions or an alternative in a plugin

I want to use sessions in a plugin, I use this code in my plugin to start a session add_action('init','register_session',1); function register_session(){ global $cons; if (session_status() === ...
0
votes
1answer
30 views

Conditional query tags do not work before the query is run. Before then, they always return false

I'm coding a plugin. When it's loaded I check is_single() which returns the following error: _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then,...
0
votes
0answers
67 views

Only the first image uploads

I am trying to upload these two images to my site: https://listing-images.homejunction.com/maris/82721628/photo_1.jpg https://listing-images.homejunction.com/maris/82721628/photo_2.jpg But only the ...
1
vote
1answer
18 views

Logout users upon login, based on caps/role?

To reduce spam registrations, users are assigned the pending role until they're vetted (at which point they're assigned the subscriber role). The pending role has no capabilities. When pending users ...
0
votes
1answer
14 views

Bypass product key [closed]

I have pro plugin from codecanyon with product key, which was used already. I couldn't use it in my new domain Is there a way how to bypass the product key via FTP ?
0
votes
1answer
16 views

custom post type plugin error [closed]

I followed the following to set up a plugin for custom post types: https://kinsta.com/blog/wordpress-custom-post-types/#register But i am getting the error: Parse error: syntax error, unexpected '', $...
0
votes
0answers
12 views

getting Sorry, you are not allowed to access this page when switching tabs

I'm working on plugin and created Top level admin menu with Settings sub menu.The Setting page has multiple tabs, [base options] [report options] etc. When I render the page for the first time, ...
0
votes
0answers
20 views

Get attribute for the selected variation - Woocommerce [closed]

I have a variable product with two attributes: condition and network. Both attributes have several items in them but I'm only interested in conditions for now: very good and good. I want to output ...
0
votes
2answers
32 views

Wordpress publish_post hook not getting featured image and meta on first publish, but works on updating title

I've been struggling to find a solution for this and I don't know if it's the Gutenberg editor or if it's the hook publish_post. Hook: function api_method($post_id) { // If this is just a revision,...
-1
votes
0answers
12 views

How to make a plugin that allows you to create a widget with a backend that can send post requests? [closed]

How to make a plugin that allows you to create a widget with a backend that can send post requests? I need to make a Wordpress plugin with a backend and a frontend. Could you tell me how to do this?
0
votes
2answers
12 views

Getting User email on logout. wp_logout

I have looked at a couple of different ways to check when a user, of a particular role, has logged out. The call is made within a plugin. In the main loop I have the following: add_action( 'wp_logout'...
0
votes
0answers
17 views

Activating child theme by “theme name”

I am developing a plugin where there is an option to install and activate the theme. Those are child themes and compatible with the parent themes. the problem is, the theme is installing correctly by ...
0
votes
0answers
12 views

How to remove email heading from default email template for woocommerce [closed]

I prepared a new e-mail template in customer-proccessing-order.php file. I'm trying to remove the variant template. I removed the order-details part. However, I could not remove the title and other ...
0
votes
0answers
32 views

Is there a way to get rendered html content of a WP post after updating?

I tried adding a filter at the content etc but that one just gives access to content stored in wp_posts. I am interested in getting the rendered html with meta tags etc for a post, after it is updated....
0
votes
0answers
12 views

WooCommerce React JS - Uncaught TypeError: Cannot read property 'createContext' of undefined [closed]

I'm in the process of extending the WooCommerce JS Customers Report to include additional columns and would like to be able to filter these via the advanced filters. I've managed to create the custom ...
0
votes
0answers
19 views

howTo let wordpress endpoint return html-page

i want let WordPress endpoint return a HTML-page. my plugin actually returns Howdy!! if i read web-browser at http://localhost/wordpress/wp-json/a0plugin/v1/testing i want get a HTML-page instead. my ...
0
votes
0answers
10 views

How to save image in uploads directory from custom plugin

in my plugin after a images elaborations I want to move this image in uploads folder. How I can do it? if (count($imagesCollectedIds) > 1 && $watermarkId) { $...
0
votes
0answers
17 views

How to show the posts listing on dashboard or custom page in admin panel?

I want to show posts listing(almost like the default post listing page) on the dashboard page. And if that is not possible then maybe on a new page in the admin area. This is the post meta that needs ...
0
votes
0answers
13 views

How can I add a success message to a mail sending form for a simple wordpress plugin?

I tried using echo but something's wrong in that echo code area. I got syntax errors and and an error saying unexpected token afterecho "Try again." <?php add_action("admin_menu&...
0
votes
0answers
11 views

Custom Post Type Capabilities - delete_published not working

For some reason, the 'delete_plublished_articles' capability on my custom post type doesn't work. I'm removing this capability from the administrator role, but I'm yet able to delete published posts. ...
0
votes
0answers
17 views

How can I hide the checkbox on the checkout page? [closed]

I am working on Woocommerce. On the checkout page, "Ship to a different address?" If the checkbox is checked, a new form opens. If the "Copy" checkbox is checked after this form is ...
0
votes
2answers
39 views

Change plugin descriptions

Is it possible to programmatically change the plugin descriptions otherwise provided by the plugin author? The text I've highlighted below is what I'm talking about wanting to change: I often find ...
0
votes
1answer
18 views

How do I fetch data from an external MSSQL database and show it on my wordpress site

I have taken a seemingly impossible project for a person of my skill-set and I am looking for as much guidance as possible. My new employer has a WP website where he has a custom post type and this ...
0
votes
1answer
19 views

Can't load a script in my plugin page

I'm trying to include two scripts, wp_media and my personal when I stay in my plugin options page, but Wordpress don't include it. Someone help? /** * Activate the plugin. */ function ...
0
votes
1answer
15 views

How to load plugin after page is loaded - pagespeed issues

is there a way to load a plugin, after the whole page is rendered and fully loaded? I have horrible pagespeed according to Google and webpagetools. One plugin (provenexpert), is loading several fonts ...
0
votes
0answers
32 views

flush_rewrite_rules() not working with update_option_{$option}

Will someone please explain to me why flushing doesn't work in my case. I added a custom settings page with a default value, but it doesn't work when I hit save changes. I use the admin_init hook to ...
0
votes
1answer
20 views

Run command “composer install” when activating wordpress plugin

I want to run the command : "composer install --prefer-dist" in a wordpress plugin in the hook register_activation_hook to install the require vendors. But when I trying to activating the ...
0
votes
0answers
5 views

How to change Cart text from First renewal to Next Renewal [closed]

I have woocommerce subscription plugin and there is text which says First renewal, I would like to change it to the Next renewal. Which is the plugin where I can find and change this value.
0
votes
0answers
17 views

user_register is having empty first name and last name

I am using the wordpress : User registration plugin. When users register using the form it adds the first name as well. but while using the add_action user_register the first name is always empty. ...
0
votes
0answers
9 views

Completely hide page from wordpress dashboard

I develop a plugin which create its pages: login, form, admin area. Creating pages done, these pages are available under Pages and Appearance/Menus. I would like to hide for example admin page ...
1
vote
0answers
26 views

I'm designing a plugin to create database indexes. Suggestions?

I'm starting a (totally open-source) little project to create a WordPress plugin that will add appropriate indexes to WP's MySQL tables to improve performance. (Some wp tables, notably wp_postmeta and ...
0
votes
0answers
8 views

Associate custom field with custom taxonomy with shortcode in backend

I am trying to associate a custom field to a custom taxonomy booked_custom_calendar. Custom field here is [notifications_user_id]. All this will be executed using a shortcode. When user clicks on ...
0
votes
0answers
12 views

wp_schedule_single_event not always running event

I'm having some problems with wp_schedule_single_event not always running the scan. We already learned about WordPress not always running events with the same name if they're scheduled too close ...
0
votes
0answers
17 views

Gutenberg - Call google map render function in save after DOM has been rendered

I have a bit of a dilemma. In the save function I need to call a function renderMap that renders a dynamic google map. However I need to call it after the DOM has been rendered. I can't seem to find a ...
1
vote
2answers
15 views

Using a post-signup hook to get user details

Update: I got this working with a different hook user_register. It looks like wpmu_activate_user was never triggering. I would still like to have this happen after the user verifies and sets a ...
3
votes
0answers
32 views

Gutenberg is there a way to know if the current block is reusable?

So I have developed some blocks using React, I save my css generated in the post meta, that's works fine. In the case of reusable blocks: Whene we set a block as reusable this block will saved as ...
0
votes
0answers
60 views

Correct way to expand custom WordPress plugin functions

I have written a plugin (procedural way) and I am trying to understand wich is the best approach to expand some of its functions by creating an other small plugin (which should expand the main plugin) ...
2
votes
1answer
11 views

Getting media library popup in custom plugin admin page

I’m creating plugin and I need to upload images. And I’m wondering if I can somehow trigger same popup as “add featured image” triggers. Is that possible? If not, how can I make an alternative? Thanks ...
0
votes
0answers
14 views

Personality quiz in wordpress using a plugin

I am trying to create a personality quiz in WordPress using a plugin 'quiz and survey master'. The plugin gives the ability to assign points to each answer but, the problem is , my quiz is based on ...
0
votes
1answer
10 views

Shortcode not appearing when used as post content in wp_insert_post() or possibly, shortcode not being registered at all

I have a plugin which creates a page upon activation and then removes it on deactivation. As part of the page creation, I wanted to use a shortcode in the post content, so I added a shortcode with ...
0
votes
0answers
19 views

How to create docker image for plugin or theme wordpress?

I want to package a WordPress plugin or theme into an image so that it can be used in various containers later. How do I do that? Thank you
0
votes
0answers
20 views

How can i solve php upgrade problem

I am using a plugin that works on Woocommerce. While no error occurs on PHP 7.2 (eg 7.3) I get an error like the following in 7.2. The developer team is not helping. How can I resolve this error? ...

1
2 3 4 5
121