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
3answers
95 views

Loading scripts with wp_register_script and wp_enqueue_script

How could I include the following script and stylesheet in a wordpress plugin if they only need to load in the admin panel? <script type="text/javascript" ...
0
votes
2answers
26 views

Plugin create pages and use templates

I have a plugin that is creating a few pages and I want to use the custom templates I made for those specific pages. The pages a creating fine and even one of the templates is working but the other ...
8
votes
3answers
282 views

Best Practice for Referencing the Plugin Directory

My plugin uses the following code to reference a file, but I've read WP_PLUGIN_DIR won't work if a user renames the default plugin folder. I would also like to replace ...
3
votes
2answers
73 views

What is the added “complexity” of custom tables?

Wordpress Codex says: Think very carefully before adding a table because it adds complexity to your plugin that many users and site builders prefer to avoid. Why is it so? Adding more tables is ...
1
vote
1answer
70 views

Call to a member function have_posts() on a non-object on normal loop

<?php defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); define( 'MY_PLUGIN_PATH', plugin_dir_path( __FILE__ ) ); define( 'MY_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); ...
0
votes
0answers
20 views

Add wordpress category id to user meta with button

I want to know which categories my users are most interested in so I want to add a button to categories theme so if they click it that is saved to user meta. Similar to this: Let user subscribe to ...
0
votes
0answers
28 views

wp_verify_nonce() didn't work in the function

I'm creating link with wp_nonce in GET parameter: $link = esc_url( wp_nonce_url( add_query_arg( 'my_arg', 1 ) , 'product_subscription' ) ); echo '<a href="'. $link .'">'. $link .'</a>'; ...
0
votes
0answers
22 views

Multisite Woocommerce Price Plugin Help Need

I want to make woocommerce multisite plugin. Which can share price and convert into local currency from main website. Price share based on user desire, not for all products. If someone know about ...
0
votes
2answers
54 views

Wordpress restrict plugin file direct access

i am developing a wordpress plugin, but before that i have checked the code for the few plugin already developed. I have seen a common approach to restrict the direct where the plugin developer starts ...
0
votes
0answers
35 views

Allowing all HTML tags in textarea

I'm developing a plugin that has a custom field which is a textarea that needs to accept all HTML tags. To sanitize the data, other than using wp_kses() and including an array of every HTML tag that ...
0
votes
0answers
26 views

How to protect a comment with a password?

Is there any way to Protect a comment with a password so that the comment can be seen only when the right password is entered. I know a post can be password protected , but thats not the way i want ...
1
vote
0answers
41 views

Is it possible to delay execution of shortcode output callback?

I have a problem : shortcode output callback triggered too early. /* Defined in plugin constructor */ add_shortcode( 'foobar' , array($this,'pre_render_routine')); function ...
1
vote
0answers
16 views

Use just a shortcode from another page

I am building a bbpress forum and I have it set up right so that when you click a forum it displays a loading image and loads the link with ajax instead of redirecting the page However, this loads ...
0
votes
0answers
49 views

How to develop custom URL redirection

I'm writing a custom theme and have a custom post type which represents an external entity (e.g. a website). Hence, I have a field 'external_url' in my post type. Part of the custom post type post's ...
0
votes
1answer
68 views

Adding Additional Variables on Menus Page

I'm learning PHP by building a plugin to show or hide menu items based on a user's location. I am a bit stuck at the moment. In the function below, the text input is being saved to the database, but ...
3
votes
1answer
22 views

Adding extra pages to plugin that shouldn't appear in the sidebar

I'm trying to add extra pages to my wordpress plugin and link to these pages through links, form forwards etc. I don't want them to appear in the menu on the left - so add_submenu_page isn't the ...
0
votes
2answers
54 views

How to enqueue JavaScripts in a plugin

I am struggling a lot this time working on including a JavaScript files in plugin folder. I am trying to create a plugin by transferring widget files from themes directory. I copied the widget file, ...
0
votes
1answer
81 views

This doesnt work for Plugin get_template_directory_uri()

function Zumper_widget_enqueue_script() { wp_enqueue_script('jquery-repeater-form',get_template_directory_uri().'/admin/js/sample.js'); } add_action('admin_print_scripts-widgets.php', ...
0
votes
1answer
20 views

How to add settings subpage from a plugin to a settings page created in theme?

I'm using add_menu_page(...) from a custom theme and I want to add subpages to that menu with add_submenu_page(...) . If I try to do it from the theme it works as expected but when I try the same from ...
0
votes
0answers
60 views

Help with folder structure for MVC plugin / theme

I know similar questions have been asked many times, but I couldn't find an answer that would help me progress with my project... Here's my situation: Large part of my project is for logged users ...
0
votes
1answer
19 views

Wordpress custom plugin developement

I'm trying to make a page in my plugin, but don't want it to appear in admin_menu, but just in my plugin page menu! I have a lot of pages, don't want them all to appear as sub menus! any ideas?
0
votes
0answers
24 views

Hooking to APIs working on WP_Posts

I'm working on a WP site, and I've found a plugin that I can use to do most of the work. But there is a problem: as I feared, it stores all of its data inside WP_Post. This is obviously pretty stupid ...
1
vote
0answers
37 views

Input in plugin widget does not allow spaces

I'm developing a plugin for a client which allows keeping records of reservations to their hotel, and it has a widget which allows clients to make reservations. However, for some reason one of the ...
0
votes
0answers
12 views

Help with Widget Update Function

I was putting together a very simple widget plugin. The one thing I'm having trouble with is updating three variable in the backend (title of the widget, affiliate ID, and number of images to show). ...
0
votes
0answers
31 views

Email not sending on wordpress

I am trying to send custom email using ajax in wordpress but it's coming back with 500 internal server error on form submission. Can anyone help me out with this concern <script ...
0
votes
1answer
47 views

Buddypress Member list not showing admin and mods

I'm trying to get a list of members for a buddy press group but the result leaves out members that are admins or mods even though exclude_admins_mods=false has been specified as a parameter. This is ...
0
votes
0answers
20 views

Display articles on spefic page slug

I need to modify a plug-in for display articles on a specific pages. the pages are : http://host/gallery/gallery-one/, and... http://host/gallery/gallery-two/ the articles are also suddivided in ...
1
vote
1answer
36 views

Shortcode returning localized HTML part

Here's my issue. I made a shortcode which makes a related article section in post content. Here's the content of this function: $a = shortcode_atts( array( 'id' => 0, ), $atts ); ...
0
votes
0answers
22 views

Adding checkbox opt out to send to campaign monitor not working

For some reason I cannot make this work. Anyone can tell me what is the issue? <?php add_action( 'register_form', 'ac_email_opt_in' ); add_action('register_post','check_checkbox',10,3); ...
0
votes
0answers
87 views

Create tabs in admin options page from custom post type loop

For a WordPress crm/password management plugin I am working on, I have created a custom post type called 'client'. I also have made a separate menu page for storing and showing the passwords of these ...
0
votes
1answer
18 views

Wp Debug Enabled True Notices and Warning

Notice: Undefined index: Zumpito_event_full_day in /home2/michael/public_html/domainname.com/wp-content/themes/themename/included/main.php on line 246 Warning: Cannot modify header information - ...
0
votes
0answers
22 views

Add Community Events 'Submit an Event' form to a page or template

I am using the Community Events add-on of The Events Calendar plugin along with Simple Membership plugin. Simple membership lets me restrict page access to different membership levels via the page ...
2
votes
0answers
25 views

Custom Taxonomy and tax_query Issue?

I am working on Plugin development and my plugin name is plugindev.I have a custom post type called team.I have a custom taxonomy Team_Category which is being registered by this code ...
0
votes
0answers
17 views

migrating user and passwords from jshop to wordpress

Hi i am migrating from jshop to wordpress so i also want to migrate old website users but there passwords a encryted using md5($string.$salt) method but then if i add user to wordpress database then ...
0
votes
0answers
39 views

How to add custom pages to menu programmatically?

So I need to add some pages when it created to the menu within plugin. Menu id is 125. Pages have taxonomy gp_hubs. $category = wp_insert_term($name, 'gp_hubs'); foreach ($sub_categories as ...
1
vote
1answer
22 views

Some strings from a .mo file do not load

In a plugin I'm developing, most translations do work, but some strings refuse to work without an apparent reason. For a settings page, I'm using this pattern: $clgs_settings_descriptions = array( ...
4
votes
2answers
63 views

Escaping built-in WP function return strings

Should one filter the output of builtin WP functions such as get_permalink() and well-known WP plugins such as ACF (Advanced Custom Fields) such as get_field()? For instance get_permalink() calls ...
0
votes
0answers
31 views

Jetpack filter hook for twitter publicize post

I would like to know whether is there any filter hook in jetpack plugin which gets called before post get published on twitter through jetpack using publicize feature. I browsed many times, but I ...
1
vote
1answer
47 views

Custom role capabilities to administrator not taking effect (no plugin)

I have created a custom post type from a plugin. I added a capability type teacher. Then I have added custom capabilities to administrator. But the problem is for the first time after completing this ...
0
votes
0answers
30 views

How to create session for user which is not an admin user

Hello I am working on building a plugin which has the following functionality like stated below My problem is I am stuck at point I have created registration form for the users where users will be ...
0
votes
0answers
27 views

Update broke rewrite rule

With the update from 4.4 to 4.4.1 somehow suddenly my rewrites aren't working anymore. I've written a plugin to show attachments on a page (the landing page specifically) so people that come to the ...
3
votes
0answers
45 views

Global Objects and Public Methods

I'm developing a plugin and am just thinking over best practices. How common is it to have a global object? Currently on plugins_loaded I am creating a global object of my class: add_action( ...
1
vote
1answer
52 views

JS Support Ticket - Auto create WP account

Maybe you guys know if it's possible to create an account when a new user creates a ticket. At this point there are 2 options. Let user create a ticket based on e-mail address Let user create an ...
0
votes
0answers
25 views

Getting a value of a post taxonomy object

The following returns the list of names of all taxonomies from my post_type: $date = get_object_taxonomies( "pa_first-registration-date" ); var_dump($date); Within this array I have the value: ...
0
votes
1answer
23 views

Unable to give correct path in wordpress

Suppose their is a wordpress theme say zumper. Apart from files such as footer.php, header.php their are other folders such as layouts inc suppose I have a file america.php in layouts folder and ...
1
vote
0answers
137 views

Create WooCommerce subscription on import CSV order file

I have a WooCommerce WordPress site running, with the upload function of customer / Order / CSV Customer Import Suite (WooThemes). This only uploads my orders & not my subscriptions ( Woothemes ...
1
vote
2answers
92 views

Why is my ajax call refreshing the page?

I'm attempting to upload an audio file via AJAX form. Here is my HTML in the profile-edit template. <form method="post" id="my_upload_form" action="" enctype="multipart/form-data"> <input ...
1
vote
1answer
37 views

How to use copy() function and paste file in /wp-content/themes directory

copy("http://localhost/medium/theme.zip","themenew.zip"); currently it is pasting file in wp-admin folder, Is there any way I can copy .zip file to /wp-content/themes directory. Thank You :)
7
votes
1answer
800 views

WordPress 4.5 deprecated get_currentuserinfo()

As of about 10 days ago, WordPress 4.5 developers deprecated get_currentuserinfo() as a pluggable function. Unfortunately my plugin uses it's own get_currentuserinfo() to login users from an external ...
1
vote
0answers
34 views

Creating shortcodes in plugin

First time creating a WP app, so please bear with me. Essentially, I want to be able to input a value in a form, which gets processed and put into the database. Once that is done, I was trying to use ...