2014-04-09 88 views
1

WordPress的 - 單獨的博客頁面不顯示帖子和顯示自定義主題的主頁...(不重定向到主頁剛剛顯示與在瀏覽器的地址欄鏈接http://www.example.com/blog博客網頁)的WordPress的 - 單獨的博客頁面不顯示帖子,但顯示自定義主題的主頁

正如我已經調整上可溼性粉劑管理員設置以下爲 SETTING>閱讀> 一個靜態頁面 頭版首頁(主題主頁)個職位,以博客(主題的獨立博客頁面)

和博客頁面包含以下代碼

<?php 
/* 
Template Name: Blog 
*/ 

get_header(); 

if (have_posts()) : 
    // Start the Loop. 
    while (have_posts()) : the_post(); 
    get_template_part('content', get_post_format()); 
    endwhile; 
    // Previous/next post navigation. 
    next_previous_paging_nav(); 
else : 
    // If no content, include the "No posts found" template. 
    get_template_part('content', 'none'); 
endif; 

get_footer(); ?> 

而且主題的主頁幾乎是靜態頁面。

+0

我不確定你使用的主題是什麼,但是你是否選擇了博客頁面內的博客模板? –

+0

是的!我還在wp-admin頁面>博客>頁面屬性>模板>博客中選擇了博客頁面的博客模板 –

+0

我正在使用自定義主題 –

回答

0

確保您的靜態主頁模板不在名爲index.phphome.php的文件中。如果WordPress檢測到這些文件中的任何一個,它會自動假定它是您帖子的模板。因此,請爲您的帖子頁面創建front-page.php或類似的靜態主頁和index.phphome.php

相關問題