diff --git a/src/functions/setup.php b/src/functions/setup.php index 0ec5f79..df60db5 100644 --- a/src/functions/setup.php +++ b/src/functions/setup.php @@ -23,4 +23,22 @@ if(!function_exists('tainacan_setup')) { } } -add_action( 'after_setup_theme', 'tainacan_setup' ); \ No newline at end of file +add_action( 'after_setup_theme', 'tainacan_setup' ); + +if ( ! function_exists( 'tainacan_post_date' ) ) { + function tainacan_post_date() { + if ( in_array( get_post_type(), array( 'post', 'attachment' ) ) ) { + $time_string = ''; + if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { + $time_string = ' '; + } + $time_string = sprintf( $time_string, + esc_attr( get_the_date( 'c' ) ), + get_the_date(), + esc_attr( get_the_modified_date( 'c' ) ), + get_the_modified_date() + ); + echo $time_string; + } + } +} \ No newline at end of file diff --git a/src/index.php b/src/index.php index 7eb1de3..87aaa1b 100644 --- a/src/index.php +++ b/src/index.php @@ -1,10 +1,10 @@
-
- - - +
+
+ +
diff --git a/src/single.php b/src/single.php index 443e657..7824515 100644 --- a/src/single.php +++ b/src/single.php @@ -1,7 +1,17 @@ - -get_header(); +
+
-get_template_part('template-parts/loop'); +
+
+ +
+
-get_footer(); \ No newline at end of file + + +
+
+ + \ No newline at end of file diff --git a/src/template-parts/loop.php b/src/template-parts/index-loop.php similarity index 93% rename from src/template-parts/loop.php rename to src/template-parts/index-loop.php index dd4c7f3..8ebccd5 100644 --- a/src/template-parts/loop.php +++ b/src/template-parts/index-loop.php @@ -1,12 +1,12 @@ -
+
diff --git a/src/template-parts/single-post.php b/src/template-parts/single-post.php new file mode 100644 index 0000000..e1aa29c --- /dev/null +++ b/src/template-parts/single-post.php @@ -0,0 +1,53 @@ + +
> +
+

+ +

+
+ +
+
+
+ +
+
+

+ | | : +

+
+ +
+

+

+ +
+
+
+
+ +
+
+ Previous post: '.'%title'); ?> +
+
+ '); ?> +
+
\ No newline at end of file