Title: Multiple themes -problem with post.php
Last modified: August 18, 2016

---

# Multiple themes -problem with post.php

 *  Resolved [eveums](https://wordpress.org/support/users/eveums/)
 * (@eveums)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/multiple-themes-problem-with-postphp/)
 * I have tried using several different themes, from several different authors, 
   that include a post.php page. I end up with an error message that the post.php
   can’t be located in the directory. The post.php page is there, though.
 * Since it’s a problem with a few themes I’ve used, and only with the “post.php”
   page, I’m wondering if there is something wrong with my blog using post.php pages…
   I’m wondering if there’s something wrong with my blog, or if I just picked up
   a few bum themes.
 * Does anyone have any ideas? Thanks!!!

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

 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/multiple-themes-problem-with-postphp/#post-199330)
 * And what exactly is post.php for? It’s not a part of WP’s theme hierarchy, so
   I assume these themes are including it into other templates for the post loop(
   assume because, with no themes mentioned, there’s no way to know for sure).
 *  Thread Starter [eveums](https://wordpress.org/support/users/eveums/)
 * (@eveums)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/multiple-themes-problem-with-postphp/#post-199359)
 * Specifically, I was having problems with the Letterhead and Connections themes.
 * I’m not very familiar with PHP or the Loop in WP, so I’m not sure how to decode
   what “post.php” is used for. Is there any kind of information that I could provide
   that would give some answers to that question?
 * Thanks for the help!!
 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/multiple-themes-problem-with-postphp/#post-199362)
 * The theme names are enough (those who are familiar with PHP, The Loop, and are
   motivated to take a look can figure the rest).
 * From a quick glance I don’t see anything that may be causing this in those themes,
   other than perhaps some conflict when run off your server. Perhaps the location
   of post.php is not being seen as local to your templates, so you might try editing
   the line in each template that loads post.php:
 * `<?php require('post.php'); ?>`
 * and change it to:
 * `<?php require(TEMPLATEPATH . '/post.php'); ?>`
 *  Thread Starter [eveums](https://wordpress.org/support/users/eveums/)
 * (@eveums)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/multiple-themes-problem-with-postphp/#post-199387)
 * Thanks for the help. I made the change, changing TEMPLATEPATH to “Letterhead”–
   the directory where the files are. I get the following errors:
 * `Warning: main(letterhead/post.php): failed to open stream: No such file or directory
   in /home/[username]/public_html/wordpress/wp-content/themes/letterhead/index.
   php on line 6`
 * Fatal error: main(): Failed opening required 'letterhead/post.php' (include_path
   ='.:/usr/local/lib/php') in /home/[username]/public_html/wordpress/wp-content/
   themes/letterhead/index.php on line 6
 * I’ve also tried deactivating all the plugins from the blog, as well. Same problem.
   Strange, huh?
 *  [Joshua Sigar](https://wordpress.org/support/users/alphaoide/)
 * (@alphaoide)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/multiple-themes-problem-with-postphp/#post-199399)
 * No, you don’t replace TEMPLATEPATH with anything. Literally, as is, put the following
   code.
 * `<?php require(TEMPLATEPATH . '/post.php'); ?>`
 *  Thread Starter [eveums](https://wordpress.org/support/users/eveums/)
 * (@eveums)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/multiple-themes-problem-with-postphp/#post-199403)
 * *blushing* Sorry, dumb mistake, I didn’t know the word TEMPLATEPATH was actually
   part of the code.
 * The TEMPLATEPATH suggestion worked perfectly. Thanks for the help Kafkaesqui 
   and Alphaoide!!
 *  [clandestina](https://wordpress.org/support/users/clandestina/)
 * (@clandestina)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/multiple-themes-problem-with-postphp/#post-199854)
 * Hi!
 * I have the same error mesages.
 * Warning: main() [function.main]: Unable to access /mnt/storage/users/c/l/a/clandestina/
   wp-content/themes/connectionspost.php in /mnt/storage/users/c/l/a/clandestina/
   wp-content/themes/connections/index.php on line 25
 * Warning: main(/mnt/storage/users/c/l/a/clandestina/wp-content/themes/connectionspost.
   php) [function.main]: failed to open stream: No such file or directory in /mnt/
   storage/users/c/l/a/clandestina/wp-content/themes/connections/index.php on line
   25
 * Fatal error: main() [function.require]: Failed opening required ‘/mnt/storage/
   users/c/l/a/clandestina/wp-content/themes/connectionspost.php’ (include_path=’.:/
   usr/lib/php’) in /mnt/storage/users/c/l/a/clandestina/wp-content/themes/connections/
   index.php on line 25
 * I tryed to put:
 * <?php require(TEMPLATEPATH . ‘/post.php’); ?>
 * instead of:
 * <?php require( ‘/post.php’); ?>
 * But it is still not working. Now the only thing i can see on my web is a completely
   white page. Can somebody help me please?
 * Thx!
 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/multiple-themes-problem-with-postphp/#post-199855)
 * clandestina, are you sure you used:
 * `<?php require(TEMPLATEPATH . '/post.php'); ?>`
 * Looking at this part of the errors:
 * `/wp-content/themes/connectionspost.php`
 * it seems to show the slash before post.php was left out.
 *  Thread Starter [eveums](https://wordpress.org/support/users/eveums/)
 * (@eveums)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/multiple-themes-problem-with-postphp/#post-199885)
 * Just wanted to note that another way to solve this problem is to replace the `
   require <post.php>` line of code with all the code included on the post.php page
   itself. This worked for me when the above solution didn’t (such as with the Exquisite
   theme).

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

The topic ‘Multiple themes -problem with post.php’ is closed to new replies.

 * 9 replies
 * 4 participants
 * Last reply from: [eveums](https://wordpress.org/support/users/eveums/)
 * Last activity: [20 years, 4 months ago](https://wordpress.org/support/topic/multiple-themes-problem-with-postphp/#post-199885)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
