add other posts singles
This commit is contained in:
parent
c8b91521ad
commit
9c18a8ced4
@ -13,8 +13,6 @@ $context = Timber::context();
|
|||||||
$timber_post = Timber::query_post();
|
$timber_post = Timber::query_post();
|
||||||
$context['post'] = $timber_post;
|
$context['post'] = $timber_post;
|
||||||
|
|
||||||
if ( post_password_required( $timber_post->ID ) ) {
|
$context['posts'] = get_posts();
|
||||||
Timber::render( 'single-password.twig', $context );
|
|
||||||
} else {
|
Timber::render('single.twig', $context );
|
||||||
Timber::render( array( 'single-' . $timber_post->ID . '.twig', 'single-' . $timber_post->post_type . '.twig', 'single-' . $timber_post->slug . '.twig', 'single.twig' ), $context );
|
|
||||||
}
|
|
||||||
|
@ -2,16 +2,23 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<!-- {{dump(post)}} -->
|
|
||||||
<article class="post-type-{{ post.titre}}">
|
<article class="post-type-{{ post.titre}}">
|
||||||
<img src="{{ post.image_event}}">
|
<img src="{{ post.image_event}}">
|
||||||
|
|
||||||
<section class="article-content">
|
<section class="article-content">
|
||||||
<h1 class="article-h1">{{ post.titre }}</h1>
|
<h1 class="article-h1">{{ post.titre }}</h1>
|
||||||
|
|
||||||
<div class="article-body">
|
<div class="article-body">
|
||||||
{{post.description}}
|
{{post.description}}
|
||||||
|
{{post.lieu}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="other-posts">
|
||||||
|
{% for item in posts %}
|
||||||
|
{% include 'components/thumbnails/thumbnails.twig' %}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
</article>
|
</article>
|
||||||
</div><!-- /content-wrapper -->
|
</div><!-- /content-wrapper -->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user