Title: [Plugin: Yet Another Related Posts Plugin] Multiple Templates
Last modified: August 19, 2016

---

# [Plugin: Yet Another Related Posts Plugin] Multiple Templates

 *  [ultimaknight](https://wordpress.org/support/users/ultimaknight/)
 * (@ultimaknight)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-multiple-templates/)
 * Just curious, if there a why to specify from within the function file which template
   file you want to use or does the plugin go strictly by what you chose in the 
   dropdown box in the admin section?
 * What I mean is let’s say I have two templates, one that displays thumbnailed 
   posts based on whatever criteria I have set on my admin section and another template
   that displays random thumbnailed posts.
 * Now lets say that on my home page I only want it to display the random posts,
   and on the other pages display the other template. Can that be done from within
   the related_* function or would I need to use conditional statements to make 
   it work?
 * [http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/](http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/)

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

 *  [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * (@mitchoyoshitaka)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-multiple-templates/#post-1323076)
 * I haven’t tried this myself, but try this:
 * `related_posts(array('template_file'=>'yarpp-template-xxx.php'));`
 * where `yarpp-template-xxx.php` is in your active theme. This should be able to
   load a different YARPP template, though it’d be tricky to get it to do something
   different actually, like display random posts. To do that, you may want to get
   another plugin or something.
 * I’d love to know if that actually works for you. 🙂
 *  [M.K. Safi](https://wordpress.org/support/users/msafi/)
 * (@msafi)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-multiple-templates/#post-1323409)
 * It worked for me!
 *  [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * (@mitchoyoshitaka)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-multiple-templates/#post-1323434)
 * Great! 🙂

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

The topic ‘[Plugin: Yet Another Related Posts Plugin] Multiple Templates’ is closed
to new replies.

 * 3 replies
 * 3 participants
 * Last reply from: [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * Last activity: [16 years, 2 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-multiple-templates/#post-1323434)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
