0
私は5ページあり、最後の2ページの異なるレイアウトを作成しました。そのレイアウトにはinfoDivクラスのdivがあり、divにはちょうど手動でソースコードに入れて、私はそれをwordpressで変更することはできません。クライアントがコードを変更する必要がないように、どうすればダッシュボードで利用できるのですか?wordpressの特定のページの特別なテンプレートのテキストを印刷する方法
<?php
/*
Template Name: Special Layout
*/
get_header();
if (have_posts()) {
while (have_posts()) {
the_post();
?>
<article class="borderClass">
<h2> <?php the_title(); ?> </h2>
<div class="infoDiv">
<h4>This is info div</h4>
<p>this is the text I want to edit or add
using dashboard.</p>
</div>
<?php the_content(); ?>
</article>
<?php
}
} else {
echo "<p>No content found</p>";
}
get_footer();