Add Image to Sitemap From an Image ACF Field

add_filter( ‘aioseo_sitemap_images’, ‘aioseo_filter_sitemap_images’, 10, 2 ); function aioseo_filter_sitemap_images( $images, $post ) { if ( ! function_exists( ‘get_field’ ) ) { return $images; } $customImage = get_field( ‘custom_image’, $post->ID ); if ( ! empty( $customImage ) ) { $images[] = wp_get_attachment_image_url(…Continue reading

Footer Copyright Current Year

$currentYear = date(“Y”); $fontSize = “16px”; $fontColor = “#FFFFFF”; $fontWeight = “400”; $fontFamily = “Lato, sans-serif”; $text = ‘© ‘ . $currentYear . ‘ by MICHELANGELO.EU‘; echo $text;Continue reading

Footer Copyright Current Year

$currentYear = date(“Y”); $fontSize = “16px”; $fontColor = “#FFFFFF”; $fontWeight = “400”; $fontFamily = “Lato, sans-serif”; $text = ‘© ‘ . $currentYear . ‘ by MICHELANGELO.EU‘; echo $text;Continue reading

Disable Gravatar Avatars

add_filter( ‘get_avatar’, function( $avatar, $id_or_email, $size, $default, $alt ) { return ”; // Return an empty string to disable the gravatar }, 10, 5 );Continue reading

Disable Categories and Tags

add_action(‘init’, function() { unregister_taxonomy_for_object_type(‘category’, ‘post’); unregister_taxonomy_for_object_type(‘post_tag’, ‘post’); });Continue reading

Disable WordPress REST API for visitors

add_filter( ‘rest_authentication_errors’, function( $result ) { if ( ! empty( $result ) ) { return $result; } if ( ! is_user_logged_in() ) { return new WP_Error( ‘rest_disabled’, __( ‘The WordPress REST API has been disabled.’ ), array( ‘status’ => 401…Continue reading