From d990c388b8a67117dcb7d3c22006a408a0022ae7 Mon Sep 17 00:00:00 2001 From: 3err0 Date: Fri, 13 Mar 2020 18:23:34 +0800 Subject: [PATCH] added support content formats --- functions.php | 14 ++++++++++++++ single.php | 6 ++---- template/post/content.php | 9 +++++++++ 3 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 functions.php create mode 100644 template/post/content.php diff --git a/functions.php b/functions.php new file mode 100644 index 0000000..10ae8dd --- /dev/null +++ b/functions.php @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/single.php b/single.php index 5bcc01d..1eeaab4 100644 --- a/single.php +++ b/single.php @@ -3,10 +3,8 @@ if ( have_posts() ) { the_post(); - echo '
'; - echo "

", the_title(), "

"; - the_content(); - echo '
'; + + get_template_part( 'template/post/content', get_post_format() ); } get_footer(); diff --git a/template/post/content.php b/template/post/content.php new file mode 100644 index 0000000..c86c9a2 --- /dev/null +++ b/template/post/content.php @@ -0,0 +1,9 @@ +
> + +'; + echo "

", the_title(), "

"; + the_content(); + echo ''; +?> +
\ No newline at end of file