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
22 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 { ...
0
votes
3answers
45 views

Featured Image not showing in admin

Currently im making new theme and had the idea of adding featured image in the admin side of wordpress, unfortunately its not working this is what i have tried I have added this code in functions.php ...
0
votes
1answer
509 views

wp_insert_user keeps echoing values

This is bugging the heck out of me. Essentially I've narrowed the issue down to one line of code: $user_id = wp_insert_user ($userdata); From what I can tell nothing should be echoed here, but I ...
0
votes
4answers
402 views

WP Cron doesn't save <iframe> or <object> in post body

I am using wp_cron to auto grab posts from a remote website and save them in my wp db. NOTICE! I am executing my code from my plugin, not from my template functions.php or somewhere else. I have my ...
0
votes
0answers
15 views

Wordpress editor filters out my data from $_POST

I am currently working on a translation plugin in Wordpress. I added a navigation bar on top of the editor like this: add_action('edit_form_top', array($this, 'add_tabs')); In that function, I add ...
0
votes
0answers
44 views

Wordpress / Woocommerce custom registration fields

I am learning php and I am creating simple registration plugin for wordpress and woocommerce. Everything works like a charm for wordpress but not for woocommerce. As you can see for woocommerce ...
-3
votes
1answer
31 views

How to modify WooCommerce plugin

I have install WooCommerce plugin in my project to take order from customer but i want to modify this plugin to perform below task 1.take order from customer and submit the order to the nearest store ...
0
votes
1answer
1k views

How to access global variable $menu inside a class function

am puzzling why can't i access the global variable $menu inside a php class function class adminMenus { public function getWPdefaultmenus(){ global $menu; return $menu; } } using ...
0
votes
1answer
32 views

Retrieving plugin options value saved through setting

Looking at this code below it work add options perfectly and saved them. However I will like to use those data at front page in my plugin short code. class MySettingsPage { /** * Holds ...
0
votes
0answers
16 views

Steps to Update a Wordpress Plugin That We Developed

We have our own Wordpress plugin for our site. Someone developed it for us some time ago. I am generally aware of how it works and am able to code PHP, JS, etc. and have made some mods on the plugin ...
0
votes
1answer
22 views

Register Page Template from Plugin

I'm trying to figure out how to properly register a page template (and all of the associated assets, like CSS and Images) from a plugin. Basically, I've created a landing page that I want to live ...
0
votes
1answer
13 views

Slug is not shown for my custom post type

Registering a custom post type as following and the slug input is not shown. Any ideas why? res = register_post_type( 'twig_anything_tmplt', [ 'label' => 'Twig Templates', ...
2
votes
1answer
655 views

save_post hook not triggered in WP v3.6.1

I developed a plugin having a custom metabox that is using the save_post hook to store data. The plugin is 18 months old and is used by thousands of customers, so I'm pretty sure everything is good. ...
0
votes
1answer
16 views

How to add conent (text) to Add New pages form of admin in WordPress

I am new to WordPress. I have created a Shortcode. Now I want to add description of Shortcode to Pages->Add New Page so the user can easily use the Shortcode which I have created. I want that text ...
0
votes
2answers
2k views

How to append new form elements in “Add New” form of Users in Wordpress admin panel?

I'm developing a WordPress plugin and I want to append some extra form fields in add new form of Users section inside admin panel without editing core files. Can somebody help me in achieving this.
0
votes
0answers
25 views

How to track purchases of users or members on wordpress cashback site ? [closed]

I am working on wordpress cash back site but couldn't get information about tracking all purchases..Its same as other cashback site who get commission from merchants and then share full or part with ...
0
votes
2answers
680 views

Creating a Link Text like Submit Button in Admin Page

I'm making an admin page for my plugin and I'd like to make a text link designed like the form button of admin pages. I tried this but didn't work well. <a href="" cless="button-primary" ...
0
votes
1answer
422 views

function triggered by “manage_users_custom_column” filter not working

I am trying to add a custom column un users.php but it stays empty. I have successfully added a column to the users admin page with this code in my theme's functions.php file: function ...
0
votes
1answer
18 views

wpdb->get_var always returning 0

I am trying to run this statement: global $wpdb; $amt = $wpdb->get_var($wpdb->prepare("SELECT SUM(amount) as amt FROM wp_pay_table WHERE postid = %i", $pid)); ...but $amt always comes out as ...
5
votes
2answers
2k views

Custom Post Type Plugin: Where Do I Put The Template?

I'm writing a custom post type plugin. Part of it I'm outputting to the template via shortcodes. But other parts need a custom post template, and I figured out how to use the template hierarchy for ...
26
votes
2answers
12k views

add_menu_page() with different name for first submenu item

The add_menu_page documentation says to pass the menu title as the second parameter: add_menu_page('Page Title', 'Menu Title', ...); When adding more pages later via add_submenu_page, the main page ...
0
votes
0answers
11 views

Strategies for a plugin to support CDN-enabled WordPress sites

I'm writing a plugin to manage favicons. Basically it: Store image files under wp-content/upload. Inject HTML in page headers with the URL of the images. I would like to support WordPress sites ...
2
votes
3answers
1k views

SESSION in WordPress Plugin Development

I wondering the session was disable in wordpress. I try to find some information on using session variables in the wordpress. I tried the following method to implement session variables in the ...
0
votes
0answers
10 views

Displaying and adding categories on a plugin page, just like we do in a post editor

wp_category_checklist() is the solution to display categories with checklist and it is working fine for me now. But I would like to port all the things in the category meta box (not the metabox ...
4
votes
3answers
2k views

PHP error with shortcode handler from a class

Currently i am using the following generic flow for adding the shortcode for a plugin. class MyPlugin { private $myvar; function baztag_func() { print $this->myvar; ...
0
votes
2answers
940 views

How to include a file using get_template_part() in a plugin?

A very simple question may be, but I'm struggling. In theme development, I worked with get_template_part() many times, and I understand its basics. But when I's developing a plugin, I wondered using ...
0
votes
1answer
23 views

update_option_{$option} not showing old value

I have the following bit of code (note, I put the mail() function in only to see what the values are): add_action('init','system_init_actions'); function system_init_actions() { ...
0
votes
1answer
30 views

How to add multiple custom URL variables?

I am building a Wordpress plugin that looks for different custom variables in the URL. The way I am able to achieve that right now is with this code: function add_custom_query_var( $vars){ ...
3
votes
1answer
2k views

How do you create a custom edit.php / edit pages page

I need to create 3 custom edit.php pages which only display pages with a certain parent and the Post New button links to a new page with the corresponding parent. The closest answer I can is do not ...
6
votes
2answers
2k 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
31 views

Add a box below admin toolbar via plugin

First of all thanks for your time and for your help. I'm looking to add a custom box below the admin toolbar on all pages via plugin(the blue one from the screenshot). In future i would like to add ...
0
votes
2answers
55 views

Rewriting URLs with a query string

I am running into a headache trying to get some url rewriting working on a wordpress website, running Centos 6 for operating system. This is what I am trying to achieve. Current URL = ...
33
votes
4answers
10k views

Best way to initiate a class in a WP plugin?

I've created a plugin, and of course being me, I wanted to go with a nice OO approach. Now what I've been doing is to create this class and then just below create an instance of this class: class ...
1
vote
1answer
27 views

Should shorcodes in i18n plugins be translated and if so, how?

Internationalizing a plugin with half a dozen shortcodes like: function plugin_show_schedule( $atts, ) { extract( shortcode_atts( array( 'type' => __('week', 'mz-mindbody-api') ...
0
votes
1answer
28 views

WP_Filesystem usage within a block of code

What i am trying to do is to have this function working within my plugin block of code without having it as plugin on it own. My current and working solution outside wordpress is Save contents ...
0
votes
0answers
14 views

Using a class to store i18n strings for global use in plugin

The following works, but I'm wondering if it's a sensible way to create i18n strings for use without my plugin: class Global_Strings { // property declaration // method declaration public ...
1
vote
1answer
155 views

Scheduled events disappear from events queue

I'm having an issue where events that I have scheduled work for a while then just stop. After looking at the event queue I see that the scheduled events are no longer in the queue. If I deactivate ...
0
votes
1answer
37 views

How to add quick edit and bulk edit fields to users admin section

Salutations, is there a way to add quick edit and bulk edit fields for the users section in wordpress. I have found a lot about post types and custom post types but i'm specifically looking to add ...
0
votes
0answers
13 views

Practical limit on number of roles

I'm building a wordpress site that uses buddy press and a BP extension called BP Activity Privacy (BPAP). What the BPAP plugin does, is allows the user to set privacy settings for posts to the ...
0
votes
0answers
35 views

Create a Payment Plugin for a Custom wordpress webiste

I had got made a custom wordpress website. The Developer had provided me with PAYU INDIA plaugin plugin, but I have account with PAYUMONEY which is diff from payuindia. Problem : If someone can ...
0
votes
1answer
48 views

Admin AJAX doesn't work in plugin admin page - Even though code is copied verbatim from Wordpress Codex

So I have been working on this for... 3 days now - and have resorted to just pasting in the code directly from the wordpress codex to get that to work then go from there. That code however doesn't ...
0
votes
1answer
21 views

Is it save to require plugin.php early to be able to use get_plugin_data() earlier?

I'd like to avoid hard coding my plugin's version at multiple places. To realize this the function get_plugin_data() comes in handy. But here the fun comes to an unpleasant stop. Checking for a plugin ...
2
votes
3answers
61 views

Change of query var in pre_get_posts not maintained

I'm creating a plugin that adds a custom feed. I am using a pre_get_posts filter to change the posts_per_page query var to -1 (to get all items of a custom post type). However, if I dump the $wp_query ...
0
votes
2answers
138 views

custom plugin with upload files does not work

I an creating a custom plugin that used shortcodes.. then it will have a feature that will upload files and stores it in wp-content/uploads/ directory.. but it seems I got an error.. Warning: ...
0
votes
0answers
48 views

How to Mimic WP Custom Fields Ajax Methods

I have an admin metabox that allows the user to add multiple items. I am attempting to mimic the effect and styling that the default WP custom fields metabox gives users on posts/pages. I have the ...
0
votes
0answers
34 views

Getting $postid into a wordpress plugin

I am trying to modify a wordpress plugin which I am using for music requests, to create a new better plugin... https://wordpress.org/plugins/music-request-manager/ The plugin is activated by using a ...
0
votes
1answer
70 views

Shortcode display outside the div

I have created a shortcode that retrives and displays a form.The content of the attribute in HTML. function check_my_login( $atts) { return '<form action="" name="" method="post" ...
0
votes
1answer
30 views

How to cancel update messages from a changed plugin

I did many changes on an plugin which was allowed to be manipulated. Now I want to be sure, that an update will not overwrite all my changes. What can I do to prohibit it from updating (or showing ...
1
vote
1answer
73 views

Why not to include reference to /wp-admin/admin.php in Plugin

Contact Form 7 recently pushed out an update which caused a few conflicts in other plugins. WPCF7 Author explains that it's because plugins are including calls to wp-admin/admin.php in their scripts ...
7
votes
2answers
2k views

Add screen options to custom admin pages

I want to add screen options to my plugin settings page, like the ones that are available in the Dashboard. I tried using the add_option method of the WP_Screen object and found that it supports ...