Index.php不';t在主页中显示我的新修改
我有一个index.php:Index.php不';t在主页中显示我的新修改,php,html,wordpress,Php,Html,Wordpress,我有一个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">
<?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
的内部,使其看起来像这样:
<div class="content-section module blog-page">
<div><h1>DOG</h1></div>
...
狗
...
现在是否可见?index.php可能无法提供您的主页。可能会显示其他几个可能的模板文件
例如,如果您的主题有一个front-page.php,那么该文件就是您想要编辑的文件。或者,如果主页是作为带有自定义页面模板的页面运行的,那么您可能正在寻找类似template-home.php的内容。没有看到网站/代码就很难说清楚,就像之前的评论员所说的那样。你能告诉我你使用的是什么主题吗?你在看哪一页?有各种各样的文件可以显示不同的页面类型,所以信息太少很难显示