Add data-no-optimize to all JS snippets
add_filter( ‘wpcode_snippet_output_js’, function( $code ) { $code = str_replace( ‘’, ”, $code ); return $code; });Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter( ‘wpcode_snippet_output_js’, function( $code ) { $code = str_replace( ‘’, ”, $code ); return $code; });Continue reading
jQuery(window).on(‘sbiafterimagesloaded’, function (event) { $ = jQuery; $(‘.sbi_hover_top’).each(function(){ var $self = $(this); $self.css({ ‘position’ : ‘absolute’, ‘top’ : ( $self.parent().height() – $self.height() ) / 2 }); }); })Continue reading
function mpcs_author_custom_bio_shortcode( $atts ) { if( !isset( $atts[‘slug’] ) || empty( $atts[‘slug’] ) ) { return; } global $post; $field = get_user_meta( $post->post_author, $atts[‘slug’], true ); if( empty( $field ) ) { return; } return ‘ ‘ . sanitize_text_field( $field…Continue reading
function mpcs_author_bio_shortcode() { return nl2br( get_the_author_meta( ‘description’ ) ); }; add_shortcode( ‘mpcs-author-bio’, ‘mpcs_author_bio_shortcode’ );Continue reading
function mepr_days_until( $date ){ return ( isset( $date ) ) ? floor( ( strtotime( $date ) – time() )/60/60/24 ) : false; } function mepr_update_mepr_trial_period() { $prd = new MeprProduct( 4480 ); //CHANGE 123 to the ID of your Membership…Continue reading
function disable_all_admin_notices() { remove_all_actions(‘admin_notices’); } add_action(‘admin_init’, ‘disable_all_admin_notices’);Continue reading