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

Redirect default login page to a custom page [duplicate]

I want to redirect the default WordPress login page to a custom login page. I am adding this code in a plugin: if (!is_user_logged_in()) { wp_redirect( wp_login_url( $redirect ) ); exit(); } ...
0
votes
1answer
124 views

How to get current page name in my wordpress plugin

I am creating a custom wordpress plugin. Where for some pages like http://example.com/clinic http://example.com/pharmacy i will append my template code from my plugin folder. Which mean i will ...
3
votes
3answers
9k views

Wordpress Vote Plugin - Vote Once and Track User

I've been looking through voting plugins and cannot seem to find one that works for me. I'm hoping you can help me out before I have to build my own as I'm tight on time. I have a page that will be ...
0
votes
2answers
31 views

Simple plugin don't display content

Trying to learn WP plugin development. Followed all the instructions. plugins/e4-test-1 directory. Main php file (e4-test-1.php): <?php /** * Plugin Name: Test 1 * Plugin URI: ...
1
vote
0answers
32 views

Adding custom input field in menu backend [duplicate]

How can I add the custom content in the menu items in the back-end. For example I want to add another input field and save it. I could not find any information in the Codex.
0
votes
3answers
31 views

Can a plugin be used to contain all custom functions to extend other plugins

I am very new to Plugin development and I have used my themes functions.php file to modify functionality as needed to date. As a result of conversation with a customer I was asked if it is possible ...
0
votes
0answers
108 views

$_POST form request with admin-post

I tried to use a form with the following markup using the action admin-post.php <form method='post' action='admin-post.php'> I'm using the action hook suggested by Wordpress to proceed the ...
0
votes
1answer
112 views

Function/Class to list categories with checkboxes

I want a list like in the pictue; witch is here - Posts->New->Select Categories At the moment i have this echo '<select name="pn-cats[]" size="8" style="width: 100%" multiple>'; $args = ...
0
votes
1answer
46 views

Create Array from data in the OPTIONS table

Good Day everyone, I'm trying to create an array from data in the Options table of wordpress. My data all start the same way plugin_order_ and then name of the field information. Is there a way to ...
0
votes
0answers
28 views

Allow users to label or classify or group posts accoring to their own criteria

Is it possible to allow individual users to group posts according to their own personal classifications. Say one user wanted to class groups by read and unread ... or 'to read' or 'shared' etc. ...
1
vote
1answer
37 views

Deletion of shared options using uninstall.php

I'm using uninstall.php for my plugin to delete all the traces my plugin did to a site on uninstall (delete). I did it in a good way, but even after the deletion there are some fields in the options ...
0
votes
0answers
16 views

Potential problems with building a plugin having sub modules?

I'm in the process of organizing a lot of different functionality that I had historically written as parts of themes so that I can break the various utilities into plugins. At this point, I have my ...
0
votes
1answer
126 views

Fatal error: Call to a member function get_page_permastruct() on a non-object

I get this error Fatal error: Call to a member function get_page_permastruct() on a non-object in C:\xampp\htdocs\wordpress\wp-includes\link-template.php on line 358 when i call this function ...
0
votes
1answer
28 views

How wordpress plugin hooks works? [duplicate]

I am new to wordpress development. I am familiar with joomla's ins-and-out working mechanish, now i want to contribute or say learn wordpress. I found that every thing in wordpress is done through ...
1
vote
1answer
4k views

how to make custom bulk actions for a WP_List_Table (core class)

I am using the WP_List_Table class and I added the links for the actions like this: function get_bulk_actions() { $actions = array(); $actions['approv'] ='<a href="#">'.__( ...
0
votes
1answer
66 views

Render custom taxonomy query as single template

Im developing a "catalogue" plugin using a custom post type and a custom taxonomy. What I want now is to display the custom taxonomy as a single page. That means I if the taxonomy term "Popular Items" ...
0
votes
1answer
22 views

Plugin loaded, but not running

We are using a plugin (https://github.com/ADeMen/GOOVAIN/) that is supposed to provide a 'get shortlink' button along with some database updates. It should look like this. This worked perfectly ...
0
votes
2answers
58 views

Displaying data from another database

I'm working on custom plugin that will pull property information from our non-wordpress database. That is working just fine. Where I'm having problems is getting the whole front end piece to work. ...
-1
votes
4answers
2k views

wpColorPicker is not a function!

i tried to use iris color picker in my plugin admin area but when i implemented i'm getting this error- TypeError: $(...).wpColorPicker is not a functionCode- function sam() { wp_enqueue_style( ...
0
votes
1answer
64 views

Checkbox Undefined index error in Plugin

I am getting some errors when trying to create a checkbox within a simple plugin I am creating. I have a simple settings page at the moment. The errors are: Illegal string offset 'single_images' ...
3
votes
1answer
66 views

Wordpress scheduled task is called but not executed

I created a plugin with a cron to update all posts of a certain type every 5 minutes. I installed WP Crontrol to check if the cron is registered correctly and everything seems to be okay. This is how ...
0
votes
0answers
23 views

Do a summary based on sections in a post

I wonder if it's possible in wordpress to create a summary, let's say at the begining of the post, that displays links to all the post section ? Example: [summary title="Summary"] [section]Title ...
5
votes
1answer
2k views

Load js/css files only on specific admin UI pages

How do I adapt this solution to work with my plugin? (Please see the link). I enqueue my css and js script as follows: function my_plugin_init() { wp_enqueue_script('my_plugin_script', ...
34
votes
5answers
7k views

Where to put my code: plugin or functions.php?

Is there an easy to understand scheme to decide what kind of code belongs to a plugin or the theme’s functions.php? There are many cases and many debates about that topic, mostly because there are ...
4
votes
1answer
2k views

How can I add columns to the post edit listing to show my custom post data?

When you click on "Posts" or "Pages", you get a paged listing of your posts or pages with the following columns: Title | Author | Categories | Tags | Date I have a plugin which gives an SEO score ...
0
votes
1answer
33 views

Screenshots on plugin page taken old [closed]

In readme before latest release they where named as: BlaBlaBla BlaBlaBla Files also named in same pattern: screenshot-01.png, screenshot-02.png After latest release only ...
0
votes
0answers
10 views

wpmu_create_site creates broken sites

I am trying to develop a WHMCS provisioning module for WordPress Multisite. So far I have managed to create several sites using wpmu_create_blog, however the function does not assign the new site to ...
0
votes
2answers
38 views

Plugin as custom page

I'm begginer in wordpress (but not begginer in PHP) and I would like to make custom search page as plugin with this url www.example.tld/book-search. It would be simple page for searching books from ...
0
votes
1answer
20 views

Merge custom plugins in one folder

I've made some plugins to print some text with php from the database. I use them in pages via shortcodes. If I put all the code in only one folder, so just one plugin, only one shortcode works,the one ...
1
vote
1answer
48 views

Wordpress Plugin with a shortcode that dynamically generates javascript. Can I use add_action without wrapping the javascript in a function?

Looks like the best way is using: add_action('wp_footer', returnJs); But if my returnJs function is inside my shortcode function and it's used more than once on a page it will return an error trying ...
0
votes
1answer
211 views

get_pages Drop down list for selection of a page

I am currently developing a plugin inside the admin page and I need to have a drop down list, listing all the pages. I need to be able to select one page and save the "ID" as an option. I am currently ...
0
votes
2answers
169 views

Why is 'register_activation_hook' undefined?

I am just getting reaquainted with writing plugins, after writing a whole two about three years ago. Following some example code I found: if(!class_exists('QuizMaster_Plugin_Template')) { class ...
0
votes
0answers
43 views

Editing dashboard according to the userrole

I'm relatively new to PHP, I'm editing a plugin that restrict demo users with the role of (subscriber) from some capabilities, and it modifies the dashboard for the demo user(subscriber) and remove ...
0
votes
0answers
24 views

wp_get_referer function always returning false

I am trying to use wp_get_referer function along with "template_redirect" hook in wordpress like this function show_page_name() { $r = wp_get_referer(); var_dump($r); die(); } add_action ...
1
vote
2answers
806 views

Can I dynamically create a link to my plugin settings/options page from my plugin description?

Currently, in my plugin description, I'm hardcoding... To customize options <a href="options-general.php?page=my-plugin-admin.php">click here</a> Is there a dynamic method to call the ...
0
votes
1answer
49 views

Refresh or redirect page after activate my plugin

I'm quite newbie in PHP and plugin development, and I think I'm missing something obvious but I dont know how to do it. When I activate my plugin (it adds some menu items), everything it's ok except ...
1
vote
1answer
40 views

How to prevent Composer dependency conflicts amongst WP plugins?

In our plugin development we use Composer to install e.g. Symfony\Process that we later use in the code. The big question is how do we make sure that this dependency is not in a conflict with some ...
3
votes
1answer
127 views

register_taxonomy with multiple object type and update_count_callback

The register_taxonomy accept array as the object type so I can link as many custom post types to a custom taxonomy. That is fine. The issue is, the default taxonomy count is always zero with the ...
0
votes
0answers
68 views

Removing trailing slash from add_rewrite_rule custom page

I'm currently working on a plugin to add a new page to display data from a custom database table. All is going well so far but when I access the new URLs they are 301 redirected to the same url with ...
0
votes
0answers
12 views

How can my plugin act Network Activated without actually being activated network?

My primary goal is to be able to update my plugins as part of the WP Updater class, but the network aspect is giving me a headache and many wasted hours I will never get back. Does anyone know how to ...
2
votes
1answer
91 views

add_rewrite_rule, plugin activation and plugin deactivation

I see a lot of example showing to call add_rewrite_rule in your init hook, e.g. function add_my_custom_rewrite() { add_rewrite_rule(... } add_action('init', 'add_my_custom_rewrite'); and in ...
0
votes
1answer
43 views

variable created in page.php is null inside of header.php

Ok, so i'm instantiating a class in page.php. Then i'm calling get_header() to include header.php now in header.php i need to access this class object and execute one of its methods but i get this ...
1
vote
1answer
188 views

Having Problem On Getting WP Post Gallery Images URL

I need to get the URL (actual Size) of all images of gallery associated with a post in single.php. The following code from Codex returns all images in very small size 150x150 which is not suitable for ...
0
votes
0answers
29 views

Issue on Getting WP Gallery Items In cpt-single.php As Attachments

Having a "Custom Post Type" called Projects I am trying to get actual URL of images added into Post Gallery and list them in class other than WordPress built in .gallery. This is the code which I ...
9
votes
3answers
9k views

How do i best handle custom plugin page actions?

I'm constantly running into the same annoyance, so i thought i'd see if there's any ideas or experience out there... I've created a plugin that uses it's own admin page. It has to. Now that i sorted ...
0
votes
0answers
70 views

Using an iframe/plugin outside wordpress

I have Wordpress installed on my website, which I normally edit in dreamweaver. I use a few plugins in wordpress that are extremely useful; normally these generate their own page and I either use an ...
0
votes
2answers
34 views

How to create an embedded code for wordpress shortcode?

What I have done I have a developed a custom WordPress plugin for displaying a custom calculator on my website. And regarding the same I have created a short-code for it which I am using to place it ...
5
votes
2answers
271 views

Should I create a theme or a plugin?

I'm working on a pro bono project to try to learn WordPress. I've been provided with a rough design (see screenshot below) and I'm struggling trying to think of how to approach the issue. My main ...
0
votes
0answers
11 views

Usage analytic for my plugin [duplicate]

I'm about to release my WP plugin and would like to track the usage of it. I would like to get detailed usage (per url) such as: how may users clicked the plugin widget. I looked at google analytics ...
33
votes
2answers
8k views

Autoloading & Namespaces in WordPress Plugins & Themes: Can it Work?

Has anyone used autoloading and/or PHP namespaces within a plugin or theme? Thoughts on using them? Any harm? Pitfalls? Note: namespaces are PHP 5.3+ only. Assume, for this question, that you know ...