Browse Source

added template part for page content

master
3err0 3 years ago
parent
commit
82eb14d187
  1. 6
      page.php
  2. 9
      template/post/content-page.php

6
page.php

@ -3,10 +3,8 @@
if ( have_posts() ) {
the_post();
echo '<div class="content">';
echo "<h1>", the_title(); , "</h1>"
the_content();
echo '</div>';
get_template_part( 'template/post/content', 'page' );
}
get_footer();

9
template/post/content-page.php

@ -0,0 +1,9 @@
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php
echo '<div class="content">';
echo "<h1>", the_title(), "</h1>";
the_content();
echo '</div>';
?>
</article>
Loading…
Cancel
Save