Last active
September 22, 2022 17:34
-
-
Save jarednova/2e63ad0e3ba92cc37903 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$context = Timber::get_context(); | |
$context['slides'] = Timber::get_posts('post_type=slides'); | |
$context['pages'] = Timber::get_posts('post_type=page&posts_per_page=2'); | |
$context['portfolio'] = Timber::get_posts('post_type=portfolio'); | |
$context['posts'] = Timber::get_posts(); //leave blank for default page query | |
Timber::render('front-page.twig', $context); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for slide in slides %} | |
{% include 'tease-slide.twig' %} | |
{% endfor %} | |
{% for page in pages %} | |
<article> | |
<h3>{{page.title}}</h3> | |
</article> | |
{% endfor %} | |
{% for item in portfolio %} | |
{% include 'tease-portfolio.twig' %} | |
{% endfor %} | |
{% for post in posts %} | |
{% include 'tease-post.twig' %} | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment