add other posts singles

This commit is contained in:
2020-05-28 09:27:03 +02:00
parent c8b91521ad
commit 9c18a8ced4
2 changed files with 12 additions and 7 deletions
+3 -5
View File
@@ -13,8 +13,6 @@ $context = Timber::context();
$timber_post = Timber::query_post();
$context['post'] = $timber_post;
if ( post_password_required( $timber_post->ID ) ) {
Timber::render( 'single-password.twig', $context );
} else {
Timber::render( array( 'single-' . $timber_post->ID . '.twig', 'single-' . $timber_post->post_type . '.twig', 'single-' . $timber_post->slug . '.twig', 'single.twig' ), $context );
}
$context['posts'] = get_posts();
Timber::render('single.twig', $context );