Title: [Plugin: Custom Post Templates] Loading different post templates
Last modified: August 20, 2016

---

# [Plugin: Custom Post Templates] Loading different post templates

 *  [robv.](https://wordpress.org/support/users/robv-1/)
 * (@robv-1)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-custom-post-templates-loading-different-post-templates/)
 * Hello,
 * I’m using custom post templates for posts that are loading within an fancy-box
   iframe.
 * The fancy-box post template is basically stripped of everything so that it’s 
   a clean looking visual when it loads on top of the current page. The problem 
   is that I would like to have the post content show up in other places with the
   default post template.
 * The way I have it set up works great and looks good, but I run into certain issues.
   if I were to add a “like-button” to the fancy-box post template, the post would
   open within the iframe and the like button would pull the src url of the iframe
   content. So when the user goes to that link they arrive at a simple white page–
   with the image and text – missing the main navigation links.
 * I currently exclude all categories with fancy-box post templates from regular
   pages, but I’d like to bridge them together in some way.
 * Is there anyway to set a rule in the functions to change the post template when
   the post is loaded from certain pages? Or perhaps a sniffer script that will 
   load a different post template if the content doesn’t exist in an iframe?
 * Any thoughts are appreciated.
    The site can be see here [http://www.robv.me/blog](http://www.robv.me/blog)
   thanks

The topic ‘[Plugin: Custom Post Templates] Loading different post templates’ is 
closed to new replies.

## Tags

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

 * 0 replies
 * 1 participant
 * Last reply from: [robv.](https://wordpress.org/support/users/robv-1/)
 * Last activity: [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-custom-post-templates-loading-different-post-templates/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
