Archives: Snippets
Untitled Snippet
Dynamic Year Copyright Shortcode
// Copy the Shortcode in the Insertion box below and paste it wherever you want the copyright symbol + year to be displayed. // This will output © 2023 or the current year automatically. echo “© ” . date( ‘Y’…Continue reading
Enable Pinch to Zoom on Mobile Devices
function remove_my_action() { remove_action(‘wp_head’, ‘et_add_viewport_meta’); } function dt_et_add_viewport_meta(){ echo ‘‘; } add_action( ‘init’, ‘remove_my_action’); add_action( ‘wp_head’, ‘dt_et_add_viewport_meta’ );Continue reading
Bid Board JavaScript
Bid Board JavaScript
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