Ajax Based Load More with Tax Query & Date Query
Here is the plugin code file. <?php /** * Plugin Name: Solar IPS News Filter * Plugin URI: * Description: The plugin is used to filter...
Hide Upcoming Events
Hiding Upcoming Events can be relatively useful when you are using ACF fields to show Dates for an an Event The Following Snippet is an...
Set minimum Quantity for Woo Commerce Product
We can set minimum quantity as by default for woo commerce product using following code We have used the Plugin Min Max Quantity plugin...
Add and Remove Class from a section on Scroll
jQuery(document).ready(function () { $(document).scroll(function() { var scrolled = $(document).scrollTop(); var bannerht =...
Redirect After AJAX Call in JQuery WP Nounce in AJAX and JSON.parse
/*footerpoupsubmit*/ jQuery('#footerpoupsubmit').click(function() { setCookie('popupclosed', 'yes', 1); jQuery.ajax({ type: 'POST', url:...
Exposing ACF Fields to WP REST API
Exposing ACF Fields to REST API is pretty Simple with help of hooks add_filter('rest_prepare_{post_type_key}', 'acf_to_rest_api', 10, 3);...
Expose Custom Fields in REST API
Code for Custom Post Type function custom_product_type() { $labels = array( 'name' => _x( 'Product', 'Post Type...
Get Row and Get Result from Global $wpdb
public static function get_juridiction_city_from_user_zip($zipcode){ global $wpdb; $sql = "SELECT * FROM ".$wpdb->prefix."dk_speakou...
Social Share Image on Twitter/Facebook/Linkedin
<!DOCTYPE html> <html> <head> <title></title> <meta property="og:locale" content="en_US" /> <meta property="og:type" content="article"...
Forget Password in WordPress
AJAX call in JavaScript jQuery('#forgetpassbutton').click(function(e){ e.preventDefault(); jQuery.ajax({ type: 'POST', url :...
Create a CSV Export in Wordress
This code creates a sample plugin that can export users from word press based on roles So logically the hook is as below add_action(...
Add CSS to Specific Page Only Wordpress
if( basename( get_page_template() ) == "page-newhome.php" ){ wp_enqueue_style( 'bootstrap', get_stylesheet_directory_uri().'/templates/...
Add custom post type under submenus with add_submenu_page()
We are adding them under last 2 items there are two custom post types Events and Orders that we added to submenu of anothermenu...
Add Custom Marker to Google Map
<div id="map"></div> <?php if(have_rows('distribution_locations')){ while (have_rows('distribution_locations')) { the_row(); $locations[]...
Get Posts Category name outside of a Loop
The following pulls all category from a custom taxonomy that has a slug as 'product-type' function getcategoryname_forproduct($postid){...
Upload Image with Ajax in wordpress
The functions.php should have a code like this Following code is used to localize the developer.js file function developer_pro_scripts()...
Using MPDF to create Professiona Certificate
The MPDF is a handy tool to create the PDF's and you can create them as ease here is what we created 2 PDF and the code is as below You...
Using Dynamic Values in Contact Form 7
This is one of cool features like we have a site where we have surgeons stored in custom post type and each surgeon has its own detail...
User Login Programmatically in WordPress
Custom JS code enqueued in active theme functions.php var userdata = { 'action' : 'signin_member', 'username' :...