I am getting thousands of 404 errors
-
Hello, I get too many 404 errors for this image. In the options I disabled the automatic compression and deleted the webp version of the logo image, but it shows up every time again.
Any help would be appreciated.
Maybe something in my functions.php is causing the Problem?
add_filter( 'xmlrpc_enabled', '__return_false' ); // Disable XML-RPC remove_action('wp_head', 'wlwmanifest_link'); //removes wlwmanifest (Windows Live Writer) link. remove_action('wp_head', 'wp_generator'); //removes meta name generator. /** * Disable the emojis in WordPress. */ add_action( 'init', function () { remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); remove_action( 'wp_print_styles', 'print_emoji_styles' ); remove_action( 'admin_print_styles', 'print_emoji_styles' ); remove_filter( 'the_content_feed', 'wp_staticize_emoji' ); remove_filter( 'comment_text_rss', 'wp_staticize_emoji' ); remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' ); // Remove from TinyMCE. add_filter( 'tiny_mce_plugins', function ( $plugins ) { if ( is_array( $plugins ) ) { return array_diff( $plugins, array( 'wpemoji' ) ); } else { return array(); } } ); // Remove from dns-prefetch. add_filter( 'wp_resource_hints', function ( $urls, $relation_type ) { if ( 'dns-prefetch' === $relation_type ) { $emoji_svg_url = apply_filters( 'emoji_svg_url', 'https://s.w.org/images/core/emoji/2/svg/' ); $urls = array_diff( $urls, array( $emoji_svg_url ) ); } return $urls; }, 10, 2 ); } ); /** * Disable RSS Feeds * Display a custom message instead of the RSS Feeds. * * @return void */ function wpcode_snippet_disable_feed() { wp_die( sprintf( // Translators: Placeholders for the homepage link. esc_html__( 'No feed available, please visit our %1$shomepage%2$s!' ), ' <a href="' . esc_url( home_url( '/' ) ) . '">', '</a>' ) ); } // Replace all feeds with the message above. add_action( 'do_feed_rdf', 'wpcode_snippet_disable_feed', 1 ); add_action( 'do_feed_rss', 'wpcode_snippet_disable_feed', 1 ); add_action( 'do_feed_rss2', 'wpcode_snippet_disable_feed', 1 ); add_action( 'do_feed_atom', 'wpcode_snippet_disable_feed', 1 ); add_action( 'do_feed_rss2_comments', 'wpcode_snippet_disable_feed', 1 ); add_action( 'do_feed_atom_comments', 'wpcode_snippet_disable_feed', 1 ); // Remove links to feed from the header. remove_action( 'wp_head', 'feed_links_extra', 3 ); remove_action( 'wp_head', 'feed_links', 2 ); /** * Remove Query Strings From Static Files */ function wpcode_snippet_remove_query_strings_split( $src ) { $output = preg_split( "/(&ver|\?ver)/", $src ); return $output ? $output[0] : ''; } add_action( 'init', function () { if ( ! is_admin() ) { add_filter( 'script_loader_src', 'wpcode_snippet_remove_query_strings_split', 15 ); add_filter( 'style_loader_src', 'wpcode_snippet_remove_query_strings_split', 15 ); } }); /** * Disable Gutenberg on the back end. */ add_filter( 'use_block_editor_for_post', '__return_false' ); // Disable Gutenberg for widgets. add_filter( 'use_widgets_block_editor', '__return_false' ); add_action( 'wp_enqueue_scripts', function() { // Remove CSS on the front end. wp_dequeue_style( 'wp-block-library' ); // Remove Gutenberg theme. wp_dequeue_style( 'wp-block-library-theme' ); // Remove inline global CSS on the front end. wp_dequeue_style( 'global-styles' ); }, 20 ); /** * Completely Disable Comments */ add_action('admin_init', function () { // Redirect any user trying to access comments page global $pagenow; if ($pagenow === 'edit-comments.php') { wp_safe_redirect(admin_url()); exit; } // Remove comments metabox from dashboard remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal'); // Disable support for comments and trackbacks in post types foreach (get_post_types() as $post_type) { if (post_type_supports($post_type, 'comments')) { remove_post_type_support($post_type, 'comments'); remove_post_type_support($post_type, 'trackbacks'); } } }); // Close comments on the front-end add_filter('comments_open', '__return_false', 20, 2); add_filter('pings_open', '__return_false', 20, 2); // Hide existing comments add_filter('comments_array', '__return_empty_array', 10, 2); // Remove comments page in menu add_action('admin_menu', function () { remove_menu_page('edit-comments.php'); }); // Remove comments links from admin bar add_action('init', function () { if (is_admin_bar_showing()) { remove_action('admin_bar_menu', 'wp_admin_bar_comments_menu', 60); } }); /** * Disable Attachment Pages */ add_action( 'template_redirect', function () { global $post; if (!is_attachment() || !isset($post->post_parent) || !is_numeric($post->post_parent)) { return; } // Does the attachment have a parent post? // If the post is trashed, fallback to redirect to homepage. if (0 !== $post->post_parent && 'trash' !== get_post_status($post->post_parent)) { // Redirect to the attachment parent. wp_safe_redirect(get_permalink($post->post_parent), 301); } else { // For attachment without a parent redirect to homepage. wp_safe_redirect(get_bloginfo('wpurl'), 302); } exit; }, 1);
- This topic was modified 1 year, 1 month ago by .
- This topic was modified 1 year, 1 month ago by .
- This topic was modified 1 year, 1 month ago by .
The page I need help with: [log in to see the link]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘I am getting thousands of 404 errors’ is closed to new replies.