(cloud) Create Map [goog_map]

//v2.0 – 02/24/2025 function goog_map_shortcode($atts = []) { // Check for bots first $bot_patterns = array( ‘googlebot’, ‘bingbot’, ‘slurp’, ‘duckduckbot’, ‘baiduspider’, ‘yandexbot’, ‘sogou’, ‘exabot’, ‘facebookexternalhit’ ); $user_agent = strtolower($_SERVER[‘HTTP_USER_AGENT’] ?? ”); foreach ($bot_patterns as $pattern) { if (strpos($user_agent, $pattern) !==…Continue reading

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

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

WP – Auto-Remove Nonsense Admin Notices

function wp_auto_remove_admin_notices() { $notice_texts = [ // Elementor version update ‘The version was updated successfully!’, // Elementor data update ‘The database update process is now complete. Thank you for updating to the latest version!’, // WP Rocket enable/disable plugin ‘One…Continue reading