![](/img/trans.png)
[英]Laravel not working with wamp 2, can't even show home page through /index.php
[英]Index.php doesn't show my new modify in home page
我有這個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();
我想在頁眉后的頁面中讀取“ DOG”,但重新加載頁面時卻什么也看不到,我也不知道為什么。 誰能幫我?
嘗試將<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可能不會提供您的主頁。 可能還會顯示其他幾個可能的模板文件。
例如,如果您的主題具有front-page.php,則該文件就是您要編輯的文件。 或者,如果主頁作為帶有自定義頁面模板的頁面運行,則可能正在尋找諸如template-home.php之類的東西。 就像以前的評論者所說的那樣,很難說出確切的內容而沒有看到站點/代碼。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.