2
我創建了我的第一個wp主題,我的首頁是動態的帖子等。我想創建一個不同於主頁面的頁面。包含靜態內容作爲主要內容和帖子的頁面模板。例;我想創建一個關於我們的頁面,並有一個靜態文本告訴觀衆我們做了什麼,但我也希望發佈帖子。我創建了頁面的動態部分,但我在靜態部分遇到問題。wordpress動態和靜態頁面
這是動態部分的樣子:
<div class="latest-posts eightcol">
<?php the_post(); ?>
<article class="post">
<h2><a title="<?php the_permalink(); ?>"> <?php the_title(); ?></a></h2>
<div class="entry-meta links-turquoise">
<?php the_time('F j, Y'); ?> —
<span class="author"> <?php the_author(); ?>utvecklare</span>
</div><!-- .entry-meta .links-turquoise -->
<div>
<?php the_content(); ?>
</div>
</article>
</div><!-- .latest-posts .eightcol -->
什麼我不知道如何寫的靜態部分。我想創建這個模板,以便我可以將相同的佈局應用於多個頁面。
我希望你明白我在找什麼。 謝謝
是的,我做到了,我複製了我的page.php並創建了about.php,但我不知道如何更改動態內容區域變爲靜態內容區域。這可能聽起來很愚蠢,但我卡住了,我真的不知道如何格式化代碼 – Abel
我編輯了我的答案來解決這個問題 – Matanya
我不確定這會回答我的問題,我正在嘗試添加一個可編輯的靜態不變的內容區域。 – Abel