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.

learn more… | top users | synonyms (1)

1
vote
1answer
61 views

How to Get WordPress custom post data in WooCommerce product meta panel?

I have created one custom post in WordPress and also created one custom panel in Woocommerce product attribute panel. Now, How I can display all the content of WordPress custom post into the ...
0
votes
0answers
24 views

Custom post type only works when role has edit_posts capability

I have been trying to create a custom post type 'book'. Added capabilities when registering custom post type. All works well except I have to give user the permission 'edit_posts' when accessing my ...
0
votes
1answer
39 views

Create a table in custom plugin on the activating it?

I'm trying to create a custom plugin where I want create a table when the plugin gets activated. I have tried the following code but it is not creating the table in the database function ...
0
votes
2answers
53 views

Creating alternate meta box context locations

I am trying to create two additional add_meta_box context locations ('after_title' and 'after_editor') within posts. This doesn't appear to do what I think it should. The meta box does appear on the ...
0
votes
1answer
43 views

Remove Custom Capability

I have created a custom post type 'book'. All book post-type are public, so I want to remove some capabilities such as 'delete_private_books', 'read_private_books' etc. How can I achieve this since ...
-2
votes
2answers
54 views

How to create wordpress plugin support page? [closed]

I want to add a support page to my plugin wordpress. My plugin is already developed. Now I want to allow users to contact me for any question. I want the support button to be next to the activate and ...
0
votes
0answers
17 views

WordPress Stored Procedure - Commands out of sync, you can't run this command now

I'm having trouble trying to call a stored procedure for my WordPress plugin. I am receiving the following error: CALL category_GetName(3) Commands out of sync; you can't run this command now ...
0
votes
1answer
20 views

in_array function Problem

Im writing a custom plugin, which will do different stuff for specific admin usernames. So admin will be able to choose couple admin usernames in plugin settings page in backend via repeateable text ...
1
vote
2answers
56 views

Custom Post Type get_post_type_archive_link( $post_type ) returns false

Permalinks are (finally) working for individual posts of the custom yoga-event type I've created. And archive works without URL rewriting: http://website.localhost/?post_type=yoga-event However ...
0
votes
1answer
40 views

Form and database, plugin development

I'm developing my first plugin. It creates directories and save the path, level (if it is a subdirectory of other created directory) and name in a custom table, created at the activation. The plugin ...
1
vote
1answer
30 views

You do not have sufficient permissions to access this page on a submenu

I'm writing my first plugin for WordPress and am running into a permission issue when trying to pass a parameter to a page. I've added a submenu page to process a delete for a category from the ...
0
votes
0answers
38 views

Create sub_menu_page in plugin without showing in menu

I've just working on some plugin on our project and I want to do 3 steps form of adding some data. I've got function init_e_menu(){ add_menu_page( 'Form', 'Form', 'manage_options', 'e-form', ...
0
votes
1answer
69 views

Best practice for plugin: always detect admin-ajax call?

Recently I was debugging/hacking a plugin authored by someone else. I put a breakpoint at a spot I was interested in - a relatively complex admin page. I noticed that even during admin-ajax calls ...
0
votes
1answer
55 views

How to set a header in wp_safe_remote_get()?

Previously I am using the below code. Now I need to change this code and replace file_get_contents() with wp_safe_remote_get(). I need to know how to set 'header' => "Accept: application/json" ...
3
votes
1answer
40 views

Some nav-menu filters do nothing

So, I've been trying to write a plugin, and I need to use the 'nav_menu_link_attributes' filter. I tried adding the filter, but it didn't respond - at all. That is, I made it die mid-process once the ...
1
vote
2answers
67 views

override pluggable.php functions

I just not only want to override a pluggable function (wp_new_user_notification) but I want to make sure that if any other plugin is overriding the same function, so my function , override that too or ...
6
votes
2answers
577 views

What is the real intention for admin-post.php?

While looking for proper form submission handling in plugins for users (frontend) I've stumbled upon this article Handling POST Requests the WordPress Way, which encourages to use admin-post.php for ...
0
votes
1answer
790 views

Uploaded image not appearing in custom post type

I am writing a plugin which should allow users to create a custom post type called reseller and attach an image. The image is being uploaded to the uploads folder and appears in the media library with ...
6
votes
3answers
6k views

How Do I Use jQuery UI In My Plugin

It's a sad day in the world when I Google something and it returns nothing. I am trying to use the default datepicker (or ANY datepicker at this point) and am unable to because of my lack of ...
0
votes
1answer
45 views

why isn't require_once working with my path names

I'm writing a plugin, and near the top of the main plugin file I have a series of require_once statements as is typical. After more than ten hours of trying to figure out why WP couldn't find my ...
0
votes
3answers
49 views

enqueue script/style plungin development

I'm developing my first plugin and wp_enqueue_style doesn't work. I'm in localhost (apache2) installation, ubuntu 14.04. In my main file I have define( 'EASYDM_CSS_DIR', plugin_dir_path( __FILE__ ...
0
votes
1answer
43 views

Gravity Forms Marketo Plugin Feed [closed]

I am wondering if anyone knows any hooks that I could use for the Marketo Gravity form Plugin? Basically, I need to change the campaign Feed dynamically based on a variable that will be in the URL ...
0
votes
2answers
40 views

Stop Plugin from Getting Styles from Other Plugin

My WordPress plugin uses Chosen Select and is supposed to use the css file at my-plugin/assets/resources/chosen.min.css. Unfortunately, when another plugin also uses Chosen Select, my plugin has a ...
4
votes
2answers
91 views

What happens when two plugins have the same 3rd party class included into them?

I am building a plugin that uses Stripe for the payment processing. I have included Stripe's PHP library into my plugin and everything works great. But what if someone else makes a plugin that also ...
0
votes
2answers
24 views

Communicating to plugins from webserver

Is it possible to communicate with a plugin from an outside source? I have an apache web server set up with wordpress running, and I would like to have automated input from a script trigger an action ...
1
vote
1answer
197 views

I would like to use create a function in my custom plugin to tell WP to use a different header

I am well aware of the use of child themes for this. I know about get_header($name). I already understand the use of conditional tags. I want my plugin to remove the function: function get_header( ...
0
votes
0answers
27 views

WordPress database error:

Thank you in advanced for any help on this issue. I have this query: $query = $wpdb->update($tablename, array( 'student_first_name' => ...
1
vote
1answer
44 views

wp_enqueue_scripts not working inside shortcode

<?php class OrdersShortcode { function __construct() { add_shortcode('order_ajax_form', array(&$this, 'order_ajax_form')); } function my_enqueued_assets() { ...
0
votes
0answers
35 views

Show error if form input field is blank

Hi i am creating a popup plugin in WordPress in which i want to disable my button which is outside form disable until my form fields are empty. I am not using submit button because after clicking ...
-1
votes
1answer
76 views

Custom theme and plugin updating

History: I'm working on a project for a client that involves building 27 unique websites that are built on wordpress. I say unique, because (for reasons that are not worth going into here) they ...
0
votes
0answers
15 views

How to select many posts from tinyMCE PluginManager

I am trying to create a plugin that allows authors to include (inline) recommended posts. I've created a tinyMCE button and I get the form where the user is supposed to select posts to include (max ...
0
votes
0answers
39 views

Woocommerce extra shipping charge for specific product

i have a product1 with id =1 I need to add extra shipping charge for product with id=1 Current Shipping settings : Flate rate is enable cost is 20 Freeshipping is enable with minimum order amount ...
0
votes
1answer
45 views

Access Child Class of Plugin Main Class Instance

In a WordPress plugin where the author has defined a parent class and uses a standard instance method for other plugin authors to access the plugin example: function WP_Plugin() { return ...
3
votes
1answer
40 views

Unit testing to simulate the loop

How do you construct unit tests with PHPUnit and the WordPress test framework that simulate being in the loop? For instance, if I want to test a function that is only able to be called in the loop ...
2
votes
2answers
6k views

Create a custom admin page for custom post type + taxonomies + metas

I'm writing a plugin that realies on custom post types, new taxonomy and few custom fields. All this data will be private (not queryable or searchable). I'd like to provide an admin page to the ...
7
votes
2answers
3k views

What should I use instead of WP_CONTENT_DIR and WP_PLUGIN_DIR?

The WordPress documentation for Determining Plugin and Content Directories states that: WordPress makes use of the following constants when determining the path to the content and plugin ...
0
votes
0answers
41 views

Send data from plugin to external database

I'm creating a plugin that I need write data to an external database (not the wp db that the plugin is on). I know I can use require_once with a separate config file with the external db details in ...
0
votes
2answers
82 views

How to utilize WP-CLI from inside WordPress, not SSH?

I'm looking for a way to test out some WP-CLI commands but from the Debug Bar Console where I normally test PHP. For cases when I don't want to switch windows to SSH, this might be a way to ...
1
vote
1answer
22 views

How to periodically scrape and cache strings from remote txt files. - My First Plugin

I maintain a resource website, FilterLists, which is essentially a directory of txt files hosted around the net. I am trying to build my first WordPress plugin to (a) learn and (b) add a new feature ...
0
votes
1answer
29 views

Correct usage of scripts with shortcodes

I'm not sure I correctly "insert" scripts in my pages. Concrete example: I need to generate a map with the google API, and decided to write a plugin to do that. Question now is what is the correct ...
0
votes
0answers
22 views

Why the output of an image gallery plugin is not displayed into a page of my custom theme?

I am pretty new as WordPress developer and I am going crazy with a theme developed by myself starting from 0. So, at this link you can download the entire theme so you can see in the details the ...
0
votes
0answers
32 views

How to add elements to admin-pages?

i think i just need a push in the right direction. I wrote a plugin for wp/woocommerce which works ok. Now i want my plugin to add a button to the normal "edit-product"-page ( to call one of the ...
0
votes
0answers
50 views

Custom Post Type and Functions

There is a very poor coding practice among freelancers that they create individual pages for every custom post types, but I think there is a better way to do this by Creating functions in ...
0
votes
1answer
54 views

custom wp_editor does not save the content in plugin settings

I am creating a custom settings page for my plugin. I have four textarea fields, Which need to be replaced by wp_editor. My problem is that I am not able to store the data to database. Bellow is my ...
0
votes
1answer
36 views

WP Multisite login not working on one subsite. Possibly cookies/ history issue?

I have a WordPress Network setup with subdomains and am having trouble with the logins. I thought at first it was an issue with a custom plugin I'm developing, but the problem persists even after ...
0
votes
1answer
43 views

wp_query (or hook) posts by date (id) in array then set post_type

Hi I am building a plugin and am not as familiar with wordpress hooks as I would like. The code would not be used to display on a page rather just setting in the database. I am looking for a hook or ...
0
votes
0answers
31 views

infinite loop wp_redirect

i'm building a website but i encountering some troubles i'm getting an infinite redirect using wp_redirect to a custom login page here is the code : require_once('form-template.php'); ...
0
votes
0answers
20 views

Post Types List in plugin options page

I'm building a gellery plugin. I've created a options page for it. I want to list post types in a select box. Codes; $args = array( 'public' => true, '_builtin' => false ); $output = ...
0
votes
1answer
33 views

How do I make a secure API call from a shortcode when a button is clicked?

I am building a plugin that displays a button on the page through a shortcode. When the button is clicked, it's supposed to send a request to an external API and retrieve an audio file. Since the API ...
0
votes
1answer
22 views

Adding admin for specific users

I was developing a website and I ran into this issue where I need to provide an "admin" account that can monitor registered user activity on my site. Now I don't want one "admin" to view users that ...