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)

0
votes
1answer
13 views

How can I allow the user to press enter without creating a new element in the editor?

I wrote a tinymce button to place a special div on my editor (I didn't use the format dropdown because the client was unsure of it). When the user presses enter inside the div it creates another ...
18
votes
5answers
5k views

Is there any plugin development framework

Since I am new to wordpress plugin development I have been examining internal structure of many plugin's and I could find most of them doesnt fit any pattern and understanding how they works is pretty ...
0
votes
1answer
64 views

WooCommerce - Create Products Programatically [closed]

I'm writing a plugin that will automatically import products via JSON API. I need to programatically create/update products. I did a research and it seems everyone is using wp_insert_post() and ...
0
votes
0answers
31 views

How to create a new database table whenever user changes options

I'am new to wordpress plugin development and I'am stuck in developing menu for my plugin. By going through documentation and many sites i created following menu. But i want to create a new table in ...
1
vote
0answers
21 views

Rewrite rule for page with plugin shortcode

I created a plugin to display a list of real estate properties on a page. The list is embedded into a custom page as a shortcode: [real_estate_list status="1"] The list is loaded from an external ...
0
votes
0answers
54 views

How To Sort and Filter Admin Custom Taxonomy Columns

I have a custom post-type with associated custom-taxonomies – how can I make these custom taxonomies sortable in the custom post-types admin/list view header (similar to how dates is sortable)? ...
9
votes
1answer
5k views

What's the difference between term_id and term_taxonomy_id

The title says it all. At the moment in my custom taxonomies I'm getting the terms using the term id and taxonomy name. Thought this question would've been asked before but can't find it anywhere! So ...
0
votes
1answer
51 views

Create a custom page template inside my wordpress plugin

I'm developing a Wordpress plugin and I want to create a file to where I want to redirect the user to show some information. I know that a perfect solution for this is using Wordpress custom pages. ...
1
vote
0answers
18 views

Redirect on Empty Query Var [duplicate]

I have a plugin with two rewrite rules: public static function cp_libdatabases_add_rewrites(){ $options = get_option( 'libdatabases_plugin_options' ); $staff_url = $options['staff_url']; ...
0
votes
3answers
10k views

wpdb->prepare and mysql UPDATE - how is it done?

Trying to set a 'removed' date time in a plugin query but I'm not sure how to use UPDATE SET with $wpdb->prepare. Here's my query: $cur_date = date('Y-m-d G:i:s'); $rows_affected = ...
0
votes
2answers
267 views

edit-tags.php in plugin admin menu hides when is the active page

For the plugin I'm building I have added a submenu as a child to a custom main menu item in admin. The submenu page is an edit-tags.php page. This shows up as intended under the main menu item. When ...
0
votes
0answers
18 views

How to sanitize an input array to save in options?

I want to santize a category IDs list before updating it, how this should be done. This is how I'm doing: $categories = get_categories(array('hide_empty'=> 0)); foreach($categories as $category) { ...
0
votes
0answers
15 views

How to use an existing localization in a new plugin?

Is there any possibility to use an existing localization? For example: My plugin adds ,,First name'' field to the registration form: <p> <label for="wp_first_name"><?php _e('First ...
11
votes
2answers
15k views

How do I create a custom role capability?

I wish to create a custom capability for accessing the interface of my plugin. Should the plugin manage adding this capability to all the administrator accounts on activation? If so: Does WordPress ...
0
votes
0answers
25 views

Designing custom templates and managing conent

I am web developer with little wordpress experience. What I am trying to do is develop and style a website to my liking using pure html and css and then use wordpress to allow the end users to edit ...
0
votes
0answers
35 views

add_action priority and taxonomy used in plugin

I try to register my taxonomy in my plugin and use it after. So far I have done: function custom_taxonomy() { $labels = array( ... ); $args = array( ... ); ...
12
votes
2answers
10k views

Should I use wpdb prepare?

I'm new to SQL and am wondering if I need to use wpdb->prepare for the following query to a table I've created global $wpdb; $tablename = $wpdb->prefix . "my_custom_table"; $sql = "SELECT * ...
0
votes
1answer
20 views

How can I see a varibles value when my plugin runs?

I am trying to make a plugin that redirects a user based on how they fill out a form. I am having trouble finding my problem I have narrowed it down to a small snippet that seems to work. function ...
0
votes
1answer
14 views

Upgrade private plugin without deleting files?

I have developed a private plugin, that is distributed and installed as a zip file. With this plugin users can upload files and the files will be stored inside the plugin’s directory. Now, I’ve got ...
1
vote
0answers
33 views

A custom post type in another post type

I can't seem to find an answer to the following question. English is not my native language so its sometimes hard to find the right words. I know how to build custom post types but i want to go a ...
0
votes
0answers
30 views

add submenu page is not working

I have following code which is not working ie not adding any submenu in plugin: function acp_add_pages() { $dirs = array('acpcf'=>'C F','acpcj'=>'C J','acppj'=>'P N'); ...
0
votes
0answers
17 views

Plugin not initialising correctly

I have written a plugin that defines a custom post type, and a custom taxonomy. class Post_Type_Faq { const POST_TYPE = "faq"; private $_meta = array( 'open', ); /** * ...
1
vote
1answer
29 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 ...
0
votes
0answers
20 views

Backslashes being stripped from CSS

The title explains my problem. Upon saving CSS stylesheet in the "Appearance > Editor", single backslashes are being stripped out of the stylesheet. For example: content="\foo" becomes: ...
0
votes
1answer
50 views

How to Add Jquery FullCalendar in wp plugin in admin

wp_register_script('moment', plugin_dir_url( __FILE__ )."js/moment.min.js", false, null, true); wp_register_script('fullcalendar', plugin_dir_url( __FILE__ )."js/fullcalendar.min.js", false, ...
0
votes
1answer
19 views

How to save default values into an option and delete those upon actvation and deactivation in wordpress?

I ma using Settings API to save and delete values to and from the options I created! But it is not working. Can someone point out to me why it is not working? Here is the code: ...
0
votes
0answers
30 views

After refresh settings field disappers

I'm working on a little plugin project to help gain a better understanding of wordpress development. So far i've been able to create dynamic text fields which a user can add themselves. Whatever the ...
0
votes
0answers
24 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
1answer
32 views

Am I correctly adding styles to plugin?

Today I noticed that two plugins (Opening Hours and Contact Form 7) had style conflicts. To fix the problem I decided to make it so that the stylesheet and js for Opening Hours would only be present ...
0
votes
0answers
189 views

Woocommerce checkout update totals with datepicker

I've added a new date field on the checkout page. I'd like to create a date based delivery fee calculation. The date field has the 'update_totals_on_change' class. When changing this manually the ...
0
votes
0answers
19 views

get_header() not defined after using template_include

I'm trying to load a custom template as part of a plugin that creates a custom post type. The template_include filter seems to work, in that it loads the file I'm aiming for, but when the ...
0
votes
0answers
17 views

Creating a user 'add custom field' section

I'm trying to make this plugin where users can add a custom attribute for something i working on: So far what i've done is: which uses this code here: window.addEventListener("DOMContentLoaded", ...
0
votes
0answers
15 views

How can I take input from a form, run it through a custom query, and display the results?

I'm having a good bit of trouble here. I'm working on a plugin that should be able to, among other things, allow the use of a shortcode to search through custom post types and their custom fields. I ...
0
votes
1answer
26 views

Wordpress-child problem with many css files in parent theme

Ok, So I'm trying to setup a child theme and can't manage to solve the problem with many different css files in parent theme. When I look at codex guide it's just give example on how to setup it with ...
-1
votes
1answer
17 views

Settings API saved values not getting shown in the dropdownbox

I am trying to save a value into the options using Settings API. The thing is getting saved, but no matter what I do, it always resets the dropdown box. So the saved values are not shown in the drop ...
1
vote
0answers
18 views

Endpoint on Specific Page Slug

I have created an endpoint inside of my plugin: add_rewrite_endpoint( 'libstaff', EP_PAGES ); Now I would like to have the endpoint work for one page only based on its slug. In this case, I want it ...
0
votes
1answer
33 views

Endpoint Callback Display for Custom Plugin

I am building a plugin which allows admins to add staff members to a database. I have created a function in my plugin class file... cp_libstaff_frontend_display() ...which displays a table of every ...
3
votes
1answer
98 views

Namespaces in WordPress - How do I initiate the main class?

I have very basic knowledge of OOP in PHP and am trying to learn to use namespaces in WordPress plugins. Followed some instructions from these 2 sources: WPSE 63668 Paulund This is how my current ...
0
votes
1answer
55 views

why update option is not working?

I have following code which is not working: var_dump($resp['status']); //output: 'status' => string 'yes' (length=3) update_option('acp_cf_settings' , array('acp_cf_status'=>$resp['status'])); ...
-1
votes
1answer
15 views

Modifying lightbox plugin to allow for quoting, Does this exist? [closed]

I've been searching online for a plugin to use with my website that would allow the the user to click on an image in a foogallery image gallery and then have the image open in a fullscreen lightbox. ...
0
votes
0answers
30 views

How to build SOAP API in Wordpress which provides data stored in custom table?

Scenario I have some projects stored in my custom table in Wordpress which I need to expose using SOAP API. So far I am able to do create standalone Soap client and Soap Server using nuSoap Library, ...
0
votes
2answers
48 views

hook filter after the_content on a specific page

I've made a function to hook after the_content. This is only working on certain pages/posts. It's working on the default template but not on my custom one's. function insertFootNote($content) { ...
1
vote
1answer
12 views

Example Dashboard Widget, Cancel not working

Working from the Code from Wordpress API Dashboard Widget Example: https://codex.wordpress.org/Example_Dashboard_Widget I am able to build the plugin, the number updates perfectly when I click ...
4
votes
2answers
116 views

How to get term link that crosses different custom post types?

In my WordPress project, I have several different custom post types and they all share a common taxonomy. I am in the final stage of the project and now is time to link all custom post types using a ...
0
votes
0answers
18 views

Auto overwrite: Plugin edits not sticking

I am trying to edit a plugin called "Calls to Action" to add personal functionality and remove all the extra stuff I don't need; and WordPress or the plugin keeps overwriting my edits. I have even ...
3
votes
3answers
5k views

How to find attachment ID for first image in a post

I am using a plugin to forward photo posts from wordpress to a tumblr blog. I have the following code: //post blog to tumblr function postBlogTumblr($postID) { $URLServer = ...
1
vote
1answer
60 views

Current user in plugin returns NULL

I am currently developing a plugin and I am trying to make use of the $current_user global. class Something { public function __construct() { $this->get_user(); var_dump( $this->user ...
1
vote
2answers
36 views

How to use output buffering in Wordpress hooked functions?

It doesn't seem that output buffering takes into account echo's from within hooked functions. function buffer_start() { ob_start(); } function buffer_end() { ob_end_flush(); } add_action('init', ...
0
votes
1answer
50 views

Add Button to TinyMCE Custom Menu

I've added a new button with a menu to the TinyMCE visual editor using this tremendously helpful tutorial but would now like to add further items to this menu depending on whether various post types ...
-1
votes
1answer
51 views

How can I insert a record into a custom table from my custom form in my custom admin page?

I'm struggling with this one and all of the relevant links to the codex, articles and forum posts (stack or otherwise) that I've searched haven't helped. I can best describe my problem as attempting ...