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

Create dedicated page with custom template showing custom data

I am trying to finish my first WordPress plugin. I've managed to create the admin part, where I load a lot of information into custom tables I've created on the same database as the WP installation, ...
1
vote
1answer
64 views

How to make Http Request to a php file present in plugin directory of wordpress

I'am new to wordpress plugin development and I'am developing a plugin (say myplugin) and I'am stuck in following problem. I had kept this plugin in mywebsite/wp-content/plugin/myplugin Inside ...
0
votes
1answer
12 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 ...
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
1answer
21 views

Allow Facebook to preview posts before published

I want to allow Facebook (user agent facebookexternalhit) to access scheduled posts before they're published, so it can access meta information in order to schedule a status. Currently I temporarily ...
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
49 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)? ...
0
votes
1answer
49 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
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 ...
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 ...
1
vote
2answers
131 views

Plugin not saving values when placed in a folder within /wp-content/plugins

Ive got the following code for a WordPRess plugin that essentially add two custom inputs on each page/post edit screen. The values are then saved and output in the header of the frontend page. The ...
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( ... ); ...
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
32 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
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
29 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
19 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
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
23 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
29 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
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
18 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
25 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 ...
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
53 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'])); ...
0
votes
0answers
29 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, ...
-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
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 ...
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 ...
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) { ...
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 ...
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
49 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
vote
2answers
35 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', ...
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
votes
1answer
50 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 ...
0
votes
1answer
34 views

How to rewrite URL and get the values?

I created a shortcode by add_shortcode. where the shortcode placed in a wordpress page to display dynamic content. The dynamic content is based on the URL value. Example If URL is ...
0
votes
1answer
18 views

Get Commentor IP When Marking Comment As Spam

What I am trying to do is create a list of IP addresses each time I click Spam on a comment. The only issue I have now is, how do I get the commentors IP address inside this function. This is what I ...
0
votes
1answer
53 views

How should I use wpdb class to submit a form in admin dashboard?

I want to create a plugin for the admin to write his everyday message in the dashboard & display it on his website. I have two files, dailymessage.php and messageform.php. In dailymessage.php I ...
0
votes
0answers
43 views

Saving plugin settings - ERROR: options page not found

I've created a form for my plugin settings and set the action attribute of the form to "options.php" but when I submit the form I get "ERROR: options page not found." add_action('admin_menu', ...
0
votes
1answer
26 views

how to create table during plugin installation in side a class

I am creating oop base plugin. So how to create table during plugin installation in side a class.But I could not create table. This is my approach.What wrong with me. class Notification { ...