Set Admin Email to [email protected]

function update_admin_email($old_value, $value) { if ($value !== ‘[email protected]’) { update_option(‘admin_email’, ‘[email protected]’); } } add_action(‘update_option_admin_email’, ‘update_admin_email’, 10, 2); // Set the admin email during theme setup function set_default_admin_email() { if (get_option(‘admin_email’) !== ‘[email protected]’) { update_option(‘admin_email’, ‘[email protected]’); } } add_action(‘after_setup_theme’, ‘set_default_admin_email’);Continue reading

Add dynamic copyright year (center) to footer

// This will output “Copyright © 2024” (or the current year) in the footer automatically. $copyright = “Copyright &#169 ” ; $current_year = date( ‘Y’ ) ; $copyright_year = $copyright . $current_year ; // Add CSS classes for styling. For…Continue reading

Add dynamic copyright year

// This will output “Copyright © 2024.” or the current year automatically. $copyright = “Copyright © ” ; $current_year = date( ‘Y’ ) ; $copyright_year = ‘‘ . $copyright . $current_year . ‘.‘ ; echo $copyright_year; // Style in CSS…Continue reading

MemberPress: Change Membership Registration URL

function mepr_change_membership_urls( $url, $product, $args, $modify_if_https ) { $url_changed = false; switch( $product->ID ) { case ‘123’: //Change 123 to membership id where you can get it from ID column from Membership table $url = MeprUtils::get_permalink( 456 ).$args; //Change 456…Continue reading