Product categories WordPress codex
How to get current product category slug?
global $wp_query; echo $wp_query->query_vars['product_cat'];
How to get current product category slug?
global $wp_query; echo $wp_query->query_vars['product_cat'];
[round-to-the-nearest-number]
JS Composer shortcode is not working outside the loop, sometimes the JS file is not enqueue to your front end page. Mine is I’m using the Ultimate_VC_Addons and I found the ultimate.min.js and ultimate.min.css is not enqueue to the page. To fix the error, copy this code to your functions.php add_action( 'wp_enqueue_scripts', 'ac_wp_enqueue_scripts' ); function…
Copy and paste the codes below to your custom template. global $current_user; echo get_avatar( $current_user->ID, 150, "https://www.anthonypagaycarbon.com/wp-content/uploads/2016/05/logo.png" ); For more detailed information, please visit here https://codex.wordpress.org/Function_Reference/get_avatar. Happy coding 🙂
Add column classes and add first class in every first column. Just change the _index = ( _index + 3 ); to your custom column. Example, if you want to create 5 columns change the _index + 3 to _index + 4 if you want to create 6 columns change the _index + 3 to…
jQuery('.wdes-popup-title').click(function(){ jQuery(jQuery(this).attr('content-id') + ' iframe' ).attr('src', id[jQuery(this).attr('content-id').replace('#','')] ); }); var id = {}; jQuery('.wdes-popup-close').click(function(){ console.log(jQuery(this).closest('.wdes-popup-main').attr('id')); if( ! id[jQuery(this).closest('.wdes-popup-main').attr('id')] ){ id[jQuery(this).closest('.wdes-popup-main').attr('id')] = jQuery('#' + jQuery(this).closest('.wdes-popup-main').attr('id') + ' iframe' ).attr('src'); } jQuery('#' + jQuery(this).closest('.wdes-popup-main').attr('id') + ' iframe' ).attr('src', ''); });
Separated number in comma and decimal point using PHP or JS number format. Commonly used in the price format and number separator. Hopefully this can help you. PHP: Found this post https://www.w3schools.com/php/func_string_number_format.asp and the codes below is the sample usage of the PHP code. echo number_format("1000000"); // output will be 1,000,000 echo number_format("1000000",2); // output…