People who code: we want your input. Take the Survey

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

How to allow wordpress logged in users to delete and edit their own comments?

Can anyone help me achieving following? tested few methods without a luck. i need to let users to edit or delete their own comments they have posted on a blog article. is there a code snippet i can ...
0
votes
0answers
33 views

Saving form with AJAX for WordPress Plugin

I am developing a WordPress plugin that needs to have multiple profiles that the admin can create on the Admin screen. The plugin appends a block to the end of every (unless specified otherwise) post, ...
0
votes
0answers
4 views

How can we save selected input of select2 in elementor custom control?

I am also building a custom control with select2 and ajax API for options. Everything works except the value is not saved in the editor when refreshing the page. I tried trigger ('input') but didn't ...
0
votes
0answers
16 views

Automatically add entries per category custom taxonomy upon plugin installation

I have a plugin created with boilerplate from this site: https://wppb.me/ And I would like to understand how to automatically add 4 entries in the custom taxonomy category that I have already ...
0
votes
0answers
19 views

add_editor_style to the blog editor view (Gutenberg?)

How do I include a css from a custom plugin that would take effect when editing the post? (I assume now the WP blog editing page are all using Gutenberg) I got this code during my research my it is ...
0
votes
0answers
25 views

Pagination not working in wordPress plugin but working in direct php [closed]

I am building a plugin to fetch and show a lot of data from an external mssql DB, but the pagination part is not working because WordPress won't let me set or update SESSION data using I have ...
0
votes
1answer
21 views

WooCommerce maintaince mode by using php

I would like to open up certain parts of my website where the remaining pages should only be accessible as an administrator on the website. I have made a maintaince plugin and it all works as it ...
0
votes
1answer
18 views

WooCommerce change Tax Class programmatically when Recalculating an existing Order [closed]

I'm hoping someone can't point me to what I am overlooking. CIRCUMSTANCE: We have some unique business logic whereby a custom user meta field affects the appropriate tax class. We have three customer ...
0
votes
0answers
6 views

Ultimate Member - multilanguage site problem (Logout and after Registration problem)

I use Ultimate Member and Polylang in my Wordpress. I'm running two languages: Portuguese (as default) and English. When a new user registers at the English registration form, after submitting, the ...
0
votes
0answers
23 views

Rerender core Templates with with ToggleControl but it doesnt recognize block type

Hey Guys I want to change my const TEMPLATE = [template] dynamically with the <InnerBlocks template={TEMPLATE} /> component. Based on a toggle I want to remove my 'core/image' block. I tried to ...
0
votes
0answers
13 views

How to correctly submit a form using ajax from a custom plugin's template

I want to submit a form from a tamplate to my custom plugin but I always get a bad request 400 response. What is the correct way yo do something like this? My form: <form id="entry_form" ...
1
vote
0answers
14 views

Using OR Condition with facetwp facets

I am using facetwp plugin in my site and i want to work with facets using OR condition as the checkbox facet type works using AND condition by default. I am using a custom taxonomy to filter my posts ...
1
vote
0answers
6 views

PHP - Extend Wordpress Woocommerce Revenue Analytics with custom field

i'm familiar with wordpress plugin development and use of hook and filters. By the way i'm encountering a big lack of documentation about what i write on the title. The need is to implement a new &...
0
votes
0answers
7 views

Add the description field on the attached media wp

Before reading my problem. please don't suggest this answer Link as this answer doesn't work on the edit screen[POPUP] on the attached media for any posts. Problem: Well, we want to add the ...
0
votes
0answers
13 views

Is there a function or hook I can use to keep track of simple plugin changes?

As the title says "Is there a function or hook I can use to keep track of simple plugin changes?" Like a type of Audit Log that displays the changes on a "Custom Post Type" type of ...
0
votes
1answer
26 views

how to save checkbox data for custom setting?

I am creating one custom setting panel, my codes are function custom_text_field_html(){ $text = get_option( 'homepage_text' ); printf( '<input type="text" id="...
0
votes
0answers
12 views

How insert negative values in Gutenberg box-control

i'm using box-control component to control the position (top, bottom, left, right) of an absolute positioned element. I have a problem: box-control doesn't allow negative values. How can i fix this or,...
1
vote
0answers
16 views

How to fetch all images from a WordPress draft using PHP?

I'm trying to fetch and download all the images from a new Gutenberg draft. It's really slow having to download each image for web optimization. So, I'm trying to create a plugin that automatically ...
1
vote
1answer
13 views

WP nonce field checkbox prints checked='checked' outside input field

I'm currently creating a custom post type in wich I want to add some custom meta boxes. All the fields just go as expected excepting a checkbox field wich prints on the html checked='checked' after ...
0
votes
1answer
24 views

How to upload an image to a custom post type

I am developing a plugin that has a custom post type. This post has a lot of meta data but I also need to attach some images to this post. What is the best way to upload an image that is related to my ...
0
votes
1answer
15 views

WooCommerce - set session with new cart item meta when updating cart item quantity [closed]

I'm trying to add meta data to cart items based on their quantity. It works all fine when I add the product to the cart, but I'm failing to update the cart item meta when the quantity is updated. I ...
0
votes
0answers
16 views

Problem with MEMCACHE and Redis with wp_options

I have developed a plugin for worpress but it is giving me problems when I start MEMCACHE o REDIS CACHE. I have been told that the problem is that I am using wp_options directly and that I should ...
0
votes
0answers
12 views

Create pagination inside a WP plugin where I am fetching data from an external server?

how do I Create pagination inside a WP plugin where I am fetching data from an external server? I have a connection to an external mssql server and fetching thousand rows of data, I need to show these ...
0
votes
0answers
20 views

HTML Elements in my WP Plugin being generated in JS. Security and Translated Text Question about this method being used

So unfortunately when developing my WP plugin I created some methods that will help me generate HTML elements and their attributes with document.createElement. One example function is provided below. (...
0
votes
0answers
12 views

How to copy the all Wordpress media items to another custom plugin folder?

I created a custom plugin to compress/zip all media items in a folder for that I create a plugin and inside the plugin, I create a folder. Now on that folder, I want to add/copy my all WordPress ...
1
vote
2answers
29 views

How to add an attribute to the body tag with a plugin?

Is there any way to add an attribute to the body tag? For example: <body test-attribute> Obviously this can be easily edited in the theme, but I'm trying to figure out how to add it with a ...
0
votes
0answers
15 views

Add attribute to links that contain certain strings?

I'm trying to add a feature to a WordPress plugin and can't seem to figure out how to. I want to add an attribute to any internal links that contain the strings /wp-admin/ or /wp-login.php I want to ...
0
votes
0answers
14 views

How do I include post types AND functional filters in a single search dropdown?

I'm working with a development agency on a WP website. I briefed them to create new filtering in the site's search functionality that brings together all content types (news blogs, reports, tools and ...
0
votes
0answers
28 views

How to silent ‘Attempting a database schema change is discouraged.’?

I have inherited one plugin for WordPress to develop. I use WordPress-Coding-Standards to make the code more coherent. It is a lost case, but the client knows better. The validation tool points me to ...
0
votes
0answers
11 views

Trigger popup on click product image in WordPress

I would like to trigger a pop-up like unsplash. I am currently using my product gallery on my home page, but I would like for my onclick function to display a popup that displays other product images, ...
0
votes
0answers
12 views

How to Change Default Core Slug in Wordpress - BBpress Plugin

I'm making custom plugin.. And I want to sync userswp plugin and bbpress plugin, so I do not want to use bbpress account page and use userswp account page instead. But userswp plugin and bbpress ...
1
vote
1answer
18 views

Cannot run script properly with my custom plugin

I'm pretty new with wordpress developing. What I'm trying to do is to add javascript to my plugin. It seems to be loaded, because when I'm console loging something like 'test' it works fine. But when ...
0
votes
0answers
10 views

On the fly image compression and cropping with Thumbor + Wordpress

So I created and online Lambda on the fly image compression BUT, there is a problem: How does one actually see these images inside of admin area, editing page etc... Since now I can just create an URL ...
1
vote
2answers
31 views

Is there a way to programmatically enable a plugin?

<?php namespace wpplugin\basic; class Basic extends \hg\wordpress\AbstractPlugin { public function register() { add_action('wp_ajax_simple_ajax2', array($this, 'onBasicFunc')); ...
0
votes
0answers
21 views

how to display the value of shortcode inserted in options page to frontend

dear wordpress developers, I'm Vietnamese, if the vocabulary I use here is not polite, please forgive me First i have shortcode [test_text] add_shortcode( 'test_text', 'showtext' ) ; function showtext(...
0
votes
1answer
17 views

Cookie value changes back to previous value after changing

I have this custom pligin that im using in order to save the user's language preferences. I store it as a cookie like so: <?php add_filter( 'init', 'aws_set_language_cookie', 999 ); ...
0
votes
1answer
17 views

Plugin header: WP and PHP version control uses wp_die(), can I change that?

I want my plugin to activate if the WP and php version in the the plugin header are at the required version or greater. However, WordPress automatically calls wp_die() if the site does not meet the ...
0
votes
3answers
31 views

Hide custom post type by user roles

I created a custom post type ( Customers ) and i want to show posts of this post type just to the users with Customer role. there is any way without or with plugin?
0
votes
0answers
15 views

How to implement color picker from WordPress in my boilerplate plugin?

I have seen this reply before: How to implement color picker from wordpress in my plugin? But I personally still don't quite understand how I can add it in my plugin that follows the boilerplate ...
1
vote
1answer
25 views

How to run a bash script from a plugin? [closed]

I am lookin for some guidance. I have a host command that has to be runned between two functions in a plug-in I am working on. Long story short, I have built a class which holds two methods, namely: ...
0
votes
1answer
45 views

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

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
17 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
36 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
14 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
1answer
17 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
23 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
46 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
71 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
22 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
16 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 ?

1
2 3 4 5
121