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
0answers
9 views

Custom Event's Plugin pages

I'm trying my hand at creating an events plugin from scratch for a client with fairly specific needs. I've gotten so far as setting up the CPT, creating and saving the metaboxes that I need with some ...
0
votes
1answer
41 views

Plugin Development: Storing and Manipulating Data That Fits JSON in Database

I am new to Wordpress plugin development but not web development in general. I have a website whose functionality I am trying to port over to Wordpress for a client that needs it in a custom plugin ...
2
votes
0answers
38 views

category_name not working (not showing up in sql query debug)

My plugin has a shortcode and it retrieves animals. There are filters/arguments and they all work well except the category argument or parameter. The category name(s) is/are well passed to my ...
0
votes
0answers
28 views

Wordpress price filter search

I am going to start create a website for a client.In his website. He need something like this Well First of all I am sorry if this question is not for this community. But I really want to k now ...
0
votes
0answers
28 views

Hide Activate Plugin message until my condition is not true

Hi i am creating a custom plugin in which i am working on dependency. so i am using the following code . include_once(ABSPATH.'wp-admin/includes/plugin.php'); function ...
0
votes
0answers
32 views

How to delete more than one table while uninstalling plugin

I have create a plugin which is creating multiple table while installing so now i want to delete them while uninstalling plugin. This is how i create the multiple table while installation function ...
-3
votes
1answer
33 views

Getting warning of Missing argument 2 for wpdb::prepare()

I am using prepare method with Update Query $updatequery = $wpdb->prepare("UPDATE `".$table_name_sms."` SET sftemplate_name = '".$message."',sftemplate_type = ...
0
votes
0answers
34 views

How to Write simple update query in Wordpress

Hi i have update query which is working fine $table_name_sms = $wpdb->prefix ."smsfactorymessagetemplate"; $updatequery = $wpdb->query("UPDATE `".$table_name_sms."` SET sftemplate_name = ...
0
votes
2answers
42 views

Where to enqueue stylesheets for plugin?

I want to enqueue stylesheet to plugin I'm developing, like this: function utm_user_scripts() { $plugin_url = plugin_dir_url( __FILE__ ); wp_enqueue_style( 'style', $plugin_url . ...
0
votes
0answers
18 views

Display custom wp_before_admin_bar_render link only for subscribers

I have wp_before_admin_bar_render link called applications . I want this link exclusive only for subscriber users. Here is my code. add_action("wp_before_admin_bar_render", "add_event_app"); ...
0
votes
0answers
28 views

Developing Wordpress Plugins with storing and exporting thousands / millions of data

I want to develop a plugin that will import and export WordPress users with csv file. But my concern is looping thousands or millions of data without exceeding php execution limit or Internal Server ...
0
votes
1answer
33 views

Call to undefined function error in plugin

I wrote a function inside a class that gets a user's country from the IP address... function getcountry() { if (!class_exists('GeoIP')) { include_once("geoip.inc"); } if ...
0
votes
1answer
59 views

How to add credit card validation check to wordpress [closed]

Im working on a restaurant reservation website and I need to add a feature similar to one found on booking.com, that is once someone wants to make the reservation I would need them to leave us their ...
1
vote
0answers
17 views

When to use Exceptions vs Error Objects vs just plain false/null

I'm in the process of writing a plugin and I'm trying to gauge when to use different approaches of handling errors. There are three methods I'm considering: Throwing an Exception (custom class) ...
0
votes
0answers
29 views

Is there a way to capture http request variables and provide different content?

I want to implement a rest webservice on top of wordpress. That means that for a given content type (custom), if the request either cotains something like ?format=json or the http negociation accepts ...
1
vote
2answers
49 views

Is using WP Transients to save external data for a plugin the best/right way?

I am developing a plugin which relies on external data to be fetched from time to time. To speed things up, I´d like to cache the received data and refresh it in intervals of 10 or 15 minutes. This ...
0
votes
0answers
14 views

Custom search for users

I've coded this up and it works great to search for "John" as a wildcard: $your_search_string = 'John'; $user_list = new WP_User_Query( array( 'search' => '*'.esc_attr( ...
0
votes
0answers
47 views

Marking Multiple Options Selected in Different Select Boxes

I've added a multi select box to each menu item on the Menus page. How can I mark multiple items as selected for a given select box? <script type="text/javascript"> ...
0
votes
0answers
63 views

Extending TinyMCE to Work with Medium Editor

I'm trying to extend tinyMCE. What i'm trying to achieve is to use this Medium Editor extend tinyMCE functionality as buttons within the backend Page / Post / Custom Post Type. This is similar to ...
0
votes
1answer
23 views

Adding another field to user table

I would like to add another field to user such as address, phone no. Added related fields in wp_users and add some come and updated with wp_update_user but it doesn't work. I can add in wp_usermeta ...
0
votes
1answer
35 views

Update File Once Every 30 Days

I'm building a plugin that requires a database file which is updated monthly. I would like to write a function that automatically replaces the old file once every 30 days. Here's what I have so far. ...
0
votes
1answer
41 views

Wordpress custom plugin that uses woocommerce enabled payment gateway for payment

I have a certain special product that I do not want to be listed with other products, nor be added to the cart. I want that specific product to have a fixed customized page where the user can pay for ...
1
vote
2answers
28 views

Can i create two tables at single time while installation of custom plugin?

Hi i want to know can i create two tables while installing my custom plugin. This is the way i am creating the tables in database function wnm_install(){ global $wpdb; global $wnm_db_version; ...
0
votes
2answers
54 views

How to insert variable which contain array value in wp_options table?

I have create a form and i want to store the form data in wp_options table so for that i have created this query $insertquery = $wpdb->query("INSERT INTO `wp_options`(`option_name`,`option_value`) ...
0
votes
0answers
34 views

Can I override the permalink/slug on creation

I have a plugin that imports data from an external API, creates a 'Product' Custom Post type ( or updates an existing one ) and then adds all the meta data. Every time we update the product from the ...
0
votes
1answer
43 views

wp_query (or hook) posts by date (id) in array then set post_type

Hi I am building a plugin and am not as familiar with wordpress hooks as I would like. The code would not be used to display on a page rather just setting in the database. I am looking for a hook or ...
0
votes
1answer
24 views

What is more secure checking capabilities of user or checking role of user in WordPress plugin development

Suppose I need to check the logged in user is subscriber not anyone else. So if I check the capability like "read". Then subscriber is OK but "read" capability is also associated to admin/publisher as ...
1
vote
0answers
28 views

How to append element after thumbnail

Hey I just wanted to know how to add an element after the first thumbnail image in my loop. Basically I want an HTML div tag inserted after the first image in my post. Anyone know how to do that in ...
0
votes
1answer
51 views

Developing a plugin where users can edit entries saved in database

it's the first time I'm writing a plugin. So far, it creates a table in database on activation, users can add entries to database and they can check saved entries. I've added Edit and Delete links ...
0
votes
0answers
21 views

Lost/Forgot Password on same page

I have a plugin that creates dynamically login page template, where login and forgot password input box both are there (www.test.com/login). Login works well with : add_action('wp_login_failed' , ...
0
votes
1answer
55 views

How to set a header in wp_safe_remote_get()?

Previously I am using the below code. Now I need to change this code and replace file_get_contents() with wp_safe_remote_get(). I need to know how to set 'header' => "Accept: application/json" ...
0
votes
1answer
34 views

Data inserted by wpdb insert is different than data pressnt in database.

I have made this insert query: $insertsuccess = $wpdb->insert( 'compservices', array( 'orderId'=> $orderID, 'orderedTime' => $date, 'useremail' ...
0
votes
1answer
18 views

Deactivate Other Incompatible Plugin Upon Activation

I'm building two mutually incompatible plugins. When either one is activated, the other must be deactivated. I'm using the code below to accomplish this. It works fine the first time I upload and ...
1
vote
0answers
47 views

Where to add hooks in a class

In the code below, shouldn't the hooks under the bottom two functions be placed inside the constructor? class The_Class { private static $instance = null; public static function ...
0
votes
0answers
27 views

Sanitization in wpdb insert not working

I have given below insert query and provided <script>alert("hello");</script> to insert in address field. But It seems its is not sanitized. In PHPMyadmin I am able to see the inserted ...
1
vote
1answer
22 views

Dynamic CSS Vs Inline Issues in Code any Way around in a Wordpress Themes?

One of my Developer has used this kind of Code to style - <div class="progress-bar progress-bar-striped custom-color-progress" role="progressbar" aria-valuenow="<?php echo $percentage?>" ...
0
votes
2answers
45 views

_e in wordpress + <a href=“<?php bloginfo('url');?>”>Home</a>

In wordpress we use _e when we have to print things. Example - <div class="col-md-12 col-sm-12 col-xs-12 tuts"> <p><?php _e( 'We are sorry, but there is nothing here! You might ...
0
votes
0answers
42 views

Notice when Extending WP_List_Table

I have extended WP_List_Table in my class, and have a fully functioning class. However I'm left with the following warning: Notice: convert_to_screen(), add_meta_box() was called incorrectly. ...
0
votes
0answers
21 views

How to make conditional wp_dropdown_categories

I would like to filter posts by using wp_dropdown_categories on change event of first category next dropdown updates with remaining categories listed in second category which matches the post. Please ...
0
votes
0answers
17 views

Create Dynamic List of Pages that are visible to search engines

I am creating a website that has a database of games. Each game will have Title, Description, Banner Image, Rating, etc... I want to just enter the game into my custom database table and have the ...
0
votes
1answer
155 views

Chosen Select jquery Not Working in Plugin

For some reason js and css files are not loading in my plugin. Here's what I have: (ostensibly unrelated code replaced with '...') class Location_Specific_Menu_Items { private static $instance = ...
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
67 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
19 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
21 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
53 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 ...