最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

plugins - Google trying to index child theme files

matteradmin9PV0评论

I have created a child theme as per Wordpress recommendation to customize my site.It is working as expected however, I am seeing some Server error (5xx) reports in the Google search console.

It seems that google is trying to index all the php files under the child theme.I am not sure what is reason behind this or how can I stop google to not index anything in the child theme.

I did some research and few people are suggesting to use

if ( ! defined( 'ABSPATH' ) ) { header( 'HTTP/1.0 403 Forbidden' ); die(); } to block direct access to these files.Is there any other solution to handle this issue in Wordpress?

**Edit**
Here is the style.css
/*
Theme Name:Child
Theme URI: 
Template: xxx
Author: Themes
Author URI: 
Description:description
Tags: blog
Version: 1.300.08.1520202511
Updated: 2018-03-04 22:28:31
*/

<?php
// Exit if accessed directly
if ( !defined( 'ABSPATH' ) ) exit;

// BEGIN ENQUEUE PARENT ACTION
// AUTO GENERATED - Do not modify or remove comment markers above or below:

// END ENQUEUE PARENT ACTION


// Custom Code

function theme_enqueue_styles() {
    wp_enqueue_style( 'custom-style', get_stylesheet_directory_uri() . '/css/jdj-custom.css' );
}
//add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles', 200 );

/**
 *  For Home page span tag
*/
Post a comment

comment list (0)

  1. No comments so far