Questions tagged [plugins]

Plugins are tools to extend the functionality of WordPress.Use the tag to mark questions related to issues and bugs faced in the plugin or its improvement. This tag should not be used to mark requests for plugin recommendations, which are off-topic per the FAQ.

3,195 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
1answer
258 views

Can I use the same textdomain in two separate plugins?

I have two plugins lets name them PluginA and PluginB. Both are part of the same project I want to internationalize the text. The question is if I use same textdomain 'myplugin' but make two files ...
2
votes
1answer
968 views

Add custom buttons with custom actions in Edit Post screen in WordPress?

I am creating something for a client and I have a Class that I created with a Custom Post Type called 'PuSH Feeds' and when the user adds a new post and publishes it they can then click on one of two ...
2
votes
1answer
527 views

custom taxonomy and custom post type url conflict

i am having one serious url issue. there is news custom post type. it's slug is news. News taxonomy slug: news_category News taxonomy url is: http://domain.com/news_category/press-release i want ...
2
votes
0answers
207 views

Upgrade Private Plugin without Deleting

I've seen numerous questions asking a way to update a private plugin by checking to self-hosted repository, or update plugin from personal API, but my question is quite different. As we all know, if ...
2
votes
0answers
438 views

Hook before & after plugin / core update

I'm working on a maintenance plugin for my website and I want to enable it before plugin/core upgrade starts and disable it after plugin/upgrade ends. Any ideas ? Thanks! :) PS: all I know is I can ...
2
votes
1answer
859 views

javascript onload calling a function of a plugin

A friend created a plugin for me which allows the users to mark posts as read or unread. The code of this plugin is the following : edit of the code ! <?php /** * @package Read-Unread * @...
2
votes
1answer
272 views

Send Data to Wordpress from kiosk

I need to get a data from kiosk (think specific ATM machine) to wordpress database. Kiosk service providers told me to give them Gateway URL and Request format to send data. Im stuck on this, I dont ...
2
votes
2answers
1k views

Multisite Widget/Content

I'm using WordPress multisite and need to display content across all subsites in the sidebar. This is a network of 50+ sites so updating all 50+ sidebars with this content every few days is not ...
2
votes
1answer
202 views

Passing $this->get_field_name() to javascript

I've tried doing this one of two ways: In the form method of my Widget class (which extends WP_Widget), I have the following snippet, which sets a global javascript variable: if( $instance ) : ?> ...
2
votes
0answers
2k views

Changing image URLs in media library

On a default wordpress install, the media library is located at: /wp-admin/upload.php. I am trying to update the image URL to point to my CDN, not my local server. This filter add_filter('...
2
votes
0answers
1k views

jQuery Plugin to use Wordpress functions in AJAX request

I'm using Chained Selects jQuery Plugin to create multiple chained selection fields. I'm using the remote version of the plugin to build the related options by means of AJAX request from a separate ...
2
votes
1answer
377 views

publish_post plugin hook doesn't always pass $post->post_content

I've written a simple plugin that grabs the contents of a post, as the post is published, and sends them to an external site for archiving. This generally works but when dealing with posts that haven'...
2
votes
0answers
1k views

Plugin/Folder permission issues with Azure

Has anyone come across plugin issues when using Wordpress with Azure? I recently spun up a free wordpress install on azurewebsites.net, using PHP 5.4 and Wordpress 3.5. Once plugin in particualr, ...
2
votes
4answers
2k views

Using plugin functionality in external php script not working

I am encountering a strange problem which I couldn't solve so far. I'm calling a .php script via cronjob (Debian/GNU Linux). To use wordpress functionailty I added: define('WP_USE_THEMES', false); ...
2
votes
0answers
43 views

How ( and mostly at what time ) can i prevent the alternate cron from running?

I'm using the alternate cron version, but i need to prevent it from running on some calls, how can i do this? In the cron.php file i've seen on line 225 if ( defined('ALTERNATE_WP_CRON') && ...
2
votes
0answers
83 views

gallery option is not available in media upload box in costum theme option page

I am creating a theme in which I have to create a sponsor's image gallery on the admin panel in theme option page. It's a slide show on the front panel. For this, I followed a tutorial to create a ...
2
votes
0answers
39 views

Get data from plugin People list in author template

I use Theme Mystique for my site, and the plugin People list. I have created several new fields for the profiles of authors in the plugin. Now I want to get these fields in the authors template. How ...
2
votes
1answer
169 views

Converting Attachment to Images?

I've had no problem using lightboxes before with attachment images, but I've switched to a new theme called Quicknote and it seems that attachment images now instead link to the attachment page. ...
1
vote
1answer
17 views

Install Plugin via Code

I'm working with a hook that is fired after a site has been added to a management portal, is there a way of install plugins through code, from url?
1
vote
0answers
14 views

Create or Update thousands of woocommerce products via PHP

I have client with a cash register in the store. That register has an API from which I'm retrieving over 5000 products and syncing them with online store. I wrote plugin that triggers cron job every ...
1
vote
1answer
14 views

Time consuming callbacks in customizer

I am having a custom state ex. 'visibility-state' which having values as true | false. I am binding this state to all the settings and settings are in 1000+ numbers. SO when the state changes it is ...
1
vote
0answers
11 views

How to display custom sidebar in wordpress 5.5.2

I am trying to display a custom sidebar in worpress 5.5.2 latest version but i have registered one sidebar in functions.php and in sidebar i want to display it so i put code to display in sidebar.php ...
1
vote
0answers
18 views

How can I add hyperlink in WP_Error message?

I using below code for showing error message to users in my WordPress website if ( $wp_error ) { return new WP_Error( 'you_cannot_vote_on_restricted', __( 'Voting on restricted posts are not ...
1
vote
1answer
33 views

Capitalize All Titles and Headlines in Chicago Style

I want to capitalize all titles and headlines on my blog according to the Chicago Manual of Style. Since this is a very tedious and time consuming task to do it manually, I thought there must be ...
1
vote
1answer
24 views

code is working properly in Core PHP but writing coding in WordPress

function generate_pdf($array) { header('Content-Type: text/csv'); header('Content-Disposition: attachment; filename="sample.csv"'); $fp = fopen('php://output', 'wb'); foreach ( $array ...
1
vote
0answers
31 views

trying to get user info in plugin

Building a plugin that I need to get the users info, more especially the userID Class userinfo { public function __construct() { add_action( 'plugins_loaded', array( $this, 'get_user_info' ...
1
vote
1answer
51 views

What is an arbitrary URL?

I have created a plugin for wordpress but I don't understand what an "arbitrary URL" is. Here's what I've found: When installed, the plugin has to make a custom endpoint available on the ...
1
vote
1answer
22 views

Custom post type - no layout section of Document tab, and no author choice

A portion of my website is used by another non-profit organization. In order to restrict them from editing/deleting at large, I created a custom post type for them, and added a user role to go with ...
1
vote
1answer
33 views

How to add an automatic refresh in Wordpress for a Page/Post or an embedded OneDrive/Excel HTML Code?

I have added an embedded Excel sheet on my website's home page. It is always displaying live data which is changing all the time. But when me or my colleagues view that page, they need to refresh the ...
1
vote
0answers
18 views

Combine scripts from all extensions of the plugin when an extension is activated

I am developing a WordPress plugin whose functionality can be extended by other plugins. The extensions simple WordPress plugins but just adds functionality by adding hooks. My main plugin loads the ...
1
vote
0answers
17 views

How to delete page by deactivating plugin

register_activation_hook( __FILE__, 'myplugin_activate' ); function myplugin_activate() { //create a variable to specify the details of page $post = array( 'post_content' ...
1
vote
0answers
69 views

Building Wordpress Plugin Using FPDF - How do you get post content from currently viewed post?

I am using FPDF to build a plugin in wordpress that will add a button on each post(documentation) that gives the user the ability to export it as a styled pdf from the post without having to maintain ...
1
vote
0answers
108 views

Creating a custom post type, adding custom meta fields, preventing all future editability of posts of this type

I am new to plug-in development and have ran into a bit of a speed bump. So here are my criteria, I am pretty much struggling to tick off any of them: I wish to create a custom post type 'website' - ...
1
vote
0answers
11 views

How to handle autoloading with composer by keeping the WordPress naming conventions?

I'm a bit confused because I'm programming a plugin for WordPress by using composer as it's the real way to go. So I've created a composer file inside my plugin and some other stuff. In the composer ...
1
vote
0answers
64 views

How to use WP-CLI / WC-CLI to bulk import 1000s of products (variable and simple)?

I am a junior developer and I have been asked to work on a wordpress site that has previously been using All Import plugin to upload products. The problem is, this is not functioning properly, and is ...
1
vote
1answer
14 views

wp_get_post_terms is difference obj model than the one in rest api response

I'm building a mobile app and using the rest API on WordPress to do that, I am customizing the /wp/v2/posts response by using the following code: add_filter('rest_prepare_post', '...
1
vote
1answer
37 views

How can I restrict image upload dimensions for non-admin WordPress users?

I want to restrict the dimensions of images uploaded by anyone who is not an administrator in WordPress to a specific size. I also want to return a specific error feedback when the image uploaded ...
1
vote
0answers
15 views

Trouble with plugin styles in admin area of Wordpress

I am creating a plugin and noticed in the admin area that my h2 and h3 tags are not showing correctly. They are the same size and not bold. I clicked inspect element, and it shows both headers having ...
1
vote
1answer
34 views

Add a CSS class based on categroy id to archive pages

How can I add a css class based on categroy id in archive pages body in wordpress? I want to style each category page different
1
vote
0answers
105 views

Add button gutenberg help

Hello I need to add a button to the toolbar gutenberg I found this https://developer.wordpress.org/block-editor/tutorials/format-api/2-toolbar-button/ but I do not get what is wrong for the button to ...
1
vote
0answers
20 views

Prevent duplicate records in plugin table

I'm working on a plugin that keeps track of like counts on every post in the site. When the plugin is activated a custom table is created to store all the data. The plugin then checks on every page ...
1
vote
0answers
15 views

How to add media field to WP_Widget form function?

I am creating simple WP_Widget plugin and I want to add one filed to form function inside it. I want to allow user to pick some photo from wordpress media. I know how to implement input text, textarea ...
1
vote
0answers
49 views

CSV syntax for WP All Import upload without ACF

I need to import listings into the Listeo theme of Wordpress using WP All Import plugin. All works fine, however, I am unable to import values for custom fields which have a type of Checkbox. I've ...
1
vote
0answers
26 views

Getting value from dymanic text variable into Contact Form 7

I have an inscription form and I'm using Contact Form 7, Conditional Fields plugin and Dynamic Text Extension. I want to show different prices according to the option selected and get the price for ...
1
vote
1answer
42 views

className not populating in custom block

I'm creating a custom block plugin and I've had a bit of trouble getting the class name to appear on a tag output from the save function. My edit function uses return() and passes in this: <> ...
1
vote
0answers
72 views

How to fix wrong attribute error for Visual Composer Grid Builder?

Hello I am facing this issue in editing media grid layout of Visual Composer V6.2.2. Below is the error I am getting Fatal error: Uncaught Exception: Wrong attribute for 'vc_single_image' shortcode. ...
1
vote
0answers
27 views

Why Wordpress plugin url ajax doesn't work?

I need to send information to the plugin folder via ajax. Wordpress has a function for the link "plugin_dir_url (__ FILE__)" which works properly but if I put it in ajax it doesn't work. Function: ...
1
vote
0answers
12 views

Keep a post copy when this one is updated - issue

I try to keep a copy of the previous version a custom post when this one is updated. It works, but duplicate the previous version twice. Help appreciated ! DUPLICATE FUNCTION : function duplicate($...
1
vote
0answers
102 views

Exporting post content from wordpress using WP All Export and wpautop() php function to include paragraph tags

I have exported my post content from wordpress using WP All Export plugin https://wordpress.org/plugins/wp-all-export/, however the content of my posts has been exported as HTML but is missing ...
1
vote
1answer
19 views

Send Custom welcome email to specific user group

i want Send Custom welcome Email to specific user group also i build a real estate site , and i want when a new buyer register to the buyer user group , also i want Custom email to be sent to him ...

1 2
3
4 5
64