2014-10-31 121 views
0

在大多數Wordpress主題中,它們使用可以爲頁面選擇的Wordpress模板。現在,在這個特定的主題中,當您爲頁面選擇一個模板時,它會放棄您在編輯器部分添加的內容。Wordpress - 將編輯器內容添加到帶有模板的頁面

當然,你應該能夠啓用這個地方?如何做到這一點或者從主題到主題有什麼不同?

回答

0

在頁面模板中添加循環和the_content()模板標籤。查看主題文件夾中的page.php模板以獲取主題所需的確切標記:

// Start the Loop. 
    while (have_posts()) : the_post(); 
?> 
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 
    <?php the_title('<header class="entry-header"><h1 class="entry-title">', '</h1></header>'); ?> 
    <div class="entry-content"> 
    <?php 
     the_content(); 
     wp_link_pages(); 
    ?> 
    </div><!-- .entry-content --> 
</article><!-- #post-## --> 
<?php 
    endwhile; 
相關問題