Title: Twig Templates
Last modified: August 21, 2016

---

# Twig Templates

 *  Resolved [riikk](https://wordpress.org/support/users/riikk/)
 * (@riikk)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/twig-templates/)
 * Hi,
    i am starting to use timber and twig, and still quite new to both. i have
   set up a page, using wordpress together with timber for two pages comin out of
   wordpress and two static pages build with twig.
 * now maybe i oversaw something, but i want these two wordpress pages use different
   templates. i cannot find the dropdown one normaly has in wordpress.
 * I want that page A only shows post form category A,
    and Page B only shows post
   form category B. how is it done, usind different templates?
 * I use the timber-starter-theme. do i need a different template.
 * thanks a lot.
 * [https://wordpress.org/plugins/timber-library/](https://wordpress.org/plugins/timber-library/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [jarednova](https://wordpress.org/support/users/jarednova/)
 * (@jarednova)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/twig-templates/#post-5081062)
 * Hi [@riikk](https://wordpress.org/support/users/riikk/), I’d love to help but
   I’m having a very difficult time understanding the issue.
 * Can you please provide a clear explanation of
 * a) what you expect to happen
    b) (compared to) what is actually happening c) 
   code you are using, and which file it is in (page.php, category.php) d) screenshots(
   for example, “dropdown one normally has in wordpress’ could mean many many things)
 *  Thread Starter [riikk](https://wordpress.org/support/users/riikk/)
 * (@riikk)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/twig-templates/#post-5081235)
 * hi jarednova,
    thanks for your feedback and sorry for my confusing answer.
 * actually now the problem is almost solved. I was looking for the dropdown to 
   select a template for a certain page.
    First it was not there, but after i changed
   to another theme and back to the timber-theme the dropdown appeared suddenly.
   see what dropdown i mean: [http://hh.dropmark.com/182907/3370770](http://hh.dropmark.com/182907/3370770)
 * Now i am stuck with getting posts of a certain category.
    According to this: 
   [https://github.com/jarednova/timber/wiki/TimberTerm](https://github.com/jarednova/timber/wiki/TimberTerm)
   i get all the Categories Listed, but not the articles.
 *  Plugin Author [jarednova](https://wordpress.org/support/users/jarednova/)
 * (@jarednova)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/twig-templates/#post-5081236)
 * I think what you’re looking for instead is…
 * $posts = Timber::get_posts(‘cat=14’);
 * …or…
 * $posts = Timber::get_posts(‘category_name=news’);
 * Timber::get_posts will take all the params for categories you find here:
 * [http://codex.wordpress.org/Class_Reference/WP_Query#Category_Parameters](http://codex.wordpress.org/Class_Reference/WP_Query#Category_Parameters)
 * … and any other parts of WP_Query
 *  Thread Starter [riikk](https://wordpress.org/support/users/riikk/)
 * (@riikk)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/twig-templates/#post-5081237)
 * thanks.
    and i put this in the index.php file (or the relating .php file of the
   template) ?
 * do i have to delete something instead? because nothing changes.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Twig Templates’ is closed to new replies.

 * ![](https://ps.w.org/timber-library/assets/icon-256x256.png?rev=1482054)
 * [Timber](https://wordpress.org/plugins/timber-library/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/timber-library/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/timber-library/)
 * [Active Topics](https://wordpress.org/support/plugin/timber-library/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/timber-library/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/timber-library/reviews/)

## Tags

 * [templates](https://wordpress.org/support/topic-tag/templates/)

 * 4 replies
 * 2 participants
 * Last reply from: [riikk](https://wordpress.org/support/users/riikk/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/twig-templates/#post-5081237)
 * Status: resolved