Sha256: a8728c2a9fc95d15bad1816e000aa447dd2ded1494153b4d58839aa715bcaeeb
Contents?: true
Size: 620 Bytes
Versions: 5
Compression:
Stored size: 620 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