MemberPress: Add Author Bio Shortcode
function mpcs_author_bio_shortcode() { return nl2br( get_the_author_meta( ‘description’ ) ); }; add_shortcode( ‘mpcs-author-bio’, ‘mpcs_author_bio_shortcode’ );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
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
window.dataLayer = window.dataLayer || []; var email = ‘{email}’; dataLayer.push({ ‘visitorType’ : email.length > 0 ? ‘existingCustomer’ : ‘newCustomer’ });Continue reading
// For non-recurring function mepr_stripe_payment_descriptor( $args ){ $args[ ‘statement_descriptor’ ] = ‘Custom Descriptor’; // max 22 chars return $args; } add_filter( ‘mepr_stripe_payment_intent_args’, ‘mepr_stripe_payment_descriptor’, 10 );Continue reading
function mepr_cust_registration_input( $product_id ) { $post_id = url_to_postid( wp_get_referer() ); if( isset( $post_id ) && $post_id ) { $input_str = ““; echo $input_str; } } add_action( ‘mepr-checkout-before-submit’, ‘mepr_cust_registration_input’ ); function mepr_cust_thankyou_url_params( $url, $args ) { if ( isset( $_REQUEST[ ‘mepr_cust_current_page_id’…Continue reading
//Alternatively, you can use the wp_head hook instead. Wp_footer works best if using ReadyLaunch(tm) function mepr_move_paypal_smart_buttons() { ?>Continue reading
//Posts function mepr_cust_pw_exclude_posts_pages( $exclude, $post ) { $exclude[] = 1234; //Change this to the post or page id you want to exclude. $exclude[] = 64; //Change this to the post or page id you want to exclude. $exclude[] = 107;…Continue reading
function mepr_override_protection( $protect, $post ) { if( has_category( ‘category_slug_here’, $post ) ) { $protect = false; } return $protect; } function mepr_override_content_protection( $protect, $post, $uri ) { return mepr_override_protection( $protect, $post ); } function mepr_override_redirection_protection( $protect, $uri, $delim ) {…Continue reading
/** * @snippet Exibe preços (Parcelado e com desconto a vista), na página do produto e no looping do produto. * @uthor Fernando Paglacci * @Website https://fernandopaglacci.com.br/snippets * @compatible WooCommerce 8 */ // Define as constantes para os valores dos…Continue reading
/* Get Statuscode 404 for existing & non-existing author archives. */ add_action( ‘template_redirect’, function() { if ( isset( $_GET[‘author’] ) || is_author() ) { global $wp_query; $wp_query->set_404(); status_header( 404 ); nocache_headers(); } }, 1 ); /* Remove the Author Links…Continue reading