Sha256: 80448fb5e19ed54911be15dd74ec43b238a1d248bdac0c053b76d81965b00cb6
Contents?: true
Size: 621 Bytes
Versions: 5
Compression:
Stored size: 621 Bytes
Contents
<?php $context = Timber::get_context(); $context["posts"] = Timber::get_posts(); $context["title"] = "Archive"; $templates = array("archive.twig"); // set title and template if (is_tag() ) { $context["title"] = single_tag_title("", false); } else if (is_category() ){ $context["title"] = single_cat_title("", false); array_unshift($templates, "archive-" . get_query_var("cat") . ".twig"); } else if (is_post_type_archive() ){ $context["title"] = post_type_archive_title("", false); array_unshift($templates, "archive-" . get_post_type() . ".twig"); } Timber::render($templates, $context);
Version data entries
5 entries across 5 versions & 1 rubygems