Archives: Snippets
Website Unavailable
add_action( ‘init’, function() { if ( ! current_user_can( ‘manage_options’ ) && ! is_admin() && ! is_login() ) { wp_die( ‘ Website Unavailable This version of the website is no longer active. The owner has moved the site to a new…Continue reading
Untitled Snippet
MemberPress: Assigning BuddyPress Member Type on Membership Signup
add_action(‘mepr_event_member_signup_completed’, function($event) { $user = $event->get_data(); bp_set_member_type($user->ID, ‘member_type’); });Continue reading
chellesbakes
Remove “No Reviews” label if there are not reviews in Tasty Recipes
function tasty_recipes_remove_no_reviews_label( $content ) { global $post; if ( ! $post ) { return $content; } $post_id = $post->ID; $has_recipe = \Tasty_Recipes::has_recipe( $post_id ); if ( ! $has_recipe ) { return $content; } $recipe_id = \Tasty_Recipes::get_recipe_ids_for_post( $post_id )[0]; $recipe =…Continue reading
Clamp Text size for Elementor
h1 {font-size: clamp(1.8125rem, 1.05328rem + 3.19672vw, 4.25rem);} h2 {font-size: clamp(1.5rem, 0.97439rem + 2.21311vw, 3.1875rem);} h3 {font-size: clamp(1.25rem, 0.89959rem + 1.47541vw, 2.375rem);} h4 {font-size: clamp(1.0625rem, 0.82889rem + 0.98361vw, 1.8125rem);} h5 {font-size: clamp(0.875rem, 0.71926rem + 0.65574vw, 1.375rem);} h6 {font-size: clamp(0.75rem, 0.67213rem +…Continue reading
https://sites.google.com/d/1avAsGl7oMBLJIChoaW9yaoOiAr-B6jfK/p/1kbx8BATlg53-QAVM9O8IXHJhuAw0qg1E/
https://sites.google.com/d/1avAsGl7oMBLJIChoaW9yaoOiAr-B6jfK/p/1kbx8BATlg53-QAVM9O8IXHJhuAw0qg1E/Continue reading
Untitled Snippet
MemberPress: Change Stripe Checkout fields to match Dark Mode theme
add_filter( ‘mepr_stripe_elements_appearance’, function( $style ) { $style[ ‘theme’ ] = ‘night’; return $style; });Continue reading