top of page

Create a Stylized Google Map

You can create stylized google map like this **DON'T REUSE API KEY** it has been changed <script src="https://polyfill.io/v3/polyfill.min...

EventBrite Events on WP

function event_brite_live_event(){ date_default_timezone_set('Pacific/Honolulu'); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,...

Change Default Post Prefix in WordPress

function add_rewrite_rules( $wp_rewrite ) { $new_rules = array( 'thoughts/(.+?)/?$' => 'index.php?post_type=post&name='....

CF7 Redirection on Submission

CF7 Provide a script for redirection as below <script> document.addEventListener( 'wpcf7mailsent', function( event ) {...

Alphabetically Sort Terms of Taxonomy

<?php function cmp($a, $b){ return strcmp($a->slug, $b->slug); } $terms = get_terms([ 'taxonomy' => 'product_brand', ...

Redirect Contact Form 7 to third party site

The following code is used for redirecting to a third party site add_action( 'wp_footer', 'ca_redirect_form',9999); function...

Dynamic Values in Contact Form 7 Fields

add_filter('wpcf7_form_tag_data_option', 'contact_dynamic_values' , 10, 3); function contact_dynamic_values($n, $options, $args) { if...

Custom Email Validation (Removal of Domain CF7)

jQuery('.validateemail').keyup(function(){ email = jQuery(this).val(); var validate= ''; var match = /^\w+[-\.\w]*@(\w+[-\.\w]*?\.\...

Meta Query and Tax Query With AJAX Filter

add_action('wp_ajax_get_all_jobs', 'get_all_jobs_callback'); add_action('wp_ajax_nopriv_get_all_jobs', 'get_all_jobs_callback'); ...

Add Author Category Tag Support to Custom Post Type

The custom post type do not support the category tags and authors here is how you can have it done Following is a part of hook used to...

Creating a Dynamic Sidebar on WP

Creating a new sidebar is useful many times The HTML The Registered Widget to Mimic HTML Above The Replaced HTML Code The Backend Code...

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...

Smooth Scroll In JS and jQuery

jQuery(document).ready(function () { jQuery('.processreachfind').click(function(e){ e.preventDefault(); jQuery('html, body').animate({...

Creating a shortcode in Wordpress

Creating a short code in word press can be handy at times Assume following code from functions.php function add_content_buttons($atts){ ...

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 =...

© 2020 by syednazrulhassan

bottom of page