索引.php在主页中不显示我的新修改



我有这个index.php:

<?php
    //Getting Header
    get_header();
?>
    <div><h1>DOG</h1></div>
<!-- This do this function -->
    <!-- Content section -->
    <div class="content-section module blog-page">
        <div class="row">
            <?php
                $object_id = get_queried_object_id();
                //Getting Single Post Sidebar Position 
//yes
                $wc_sidebar_position_default = get_theme_mod("wc_blogsection_manage_sidebar");
                $wc_sidebar_position_special = get_post_meta($object_id, "wc_innerpage_sidebar_position", true);
                if($wc_sidebar_position_special == "left_sidebar"  || 
                   $wc_sidebar_position_special == "right_sidebar" || 
                   $wc_sidebar_position_special == "disable_sidebar") { 
                    $wc_sidebar_position = $wc_sidebar_position_special;
                } else { 
                    $wc_sidebar_position = $wc_sidebar_position_default;
                }
                switch($wc_sidebar_position) { 
                    case "left_sidebar":
                        //left sidebar
                        get_sidebar();
                        //Getting posts sides
                        get_template_part('template-parts/post-type/blog');
                    break;
                    case "right_sidebar":
                        //Getting posts sides
                        get_template_part('template-parts/post-type/blog');
                        //Right Sidebar
                        get_sidebar();
                    break;
                    case "disable_sidebar":
                        //Getting posts sides
                        get_template_part('template-parts/post-type/blog'); 
                    break;
                    default:
                        //Getting posts sides
                        get_template_part('template-parts/post-type/blog');
                        //Right Sidebar
                        get_sidebar();
                }//Ends Switch
            ?>
        </div><!-- Row Ends /-->
    </div>
    <!-- Content Section Ends /-->
<?php
    //Getting Footer
    get_footer();

我想在标题后的页面上阅读"狗",但是当我重新加载页面时,我什么都不读,我不知道为什么。谁能帮我?

尝试将<div><h1>DOG</h1></div>移入Div <div class="content-section module blog-page">的内部,因此看起来像这样:

<div class="content-section module blog-page">
<div><h1>DOG</h1></div>
...

现在可以看到吗?

您的主页可能不会由index.php提供。可能还有其他几个可能显示的模板文件。

例如,如果您的主题具有前页面.php,那将是您要编辑的文件。或者,如果主页作为带有自定义页面模板的页面运行,则可能正在寻找诸如template-home.php之类的内容。就像以前的评论者所说的那样,很难确切地说不见网站/代码。

最新更新