Title: &#8216;include_path&#8217; required for &#8216;include&#8217;
Last modified: August 19, 2016

---

# ‘include_path’ required for ‘include’

 *  [bmdavis](https://wordpress.org/support/users/bmdavis/)
 * (@bmdavis)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/include_path-required-for-include/)
 * I have wordpress on a subdirectory and want to reference it on the main page.
   I do not want to use standard wordpress forms because I want to control it differently
   than I control the main wordpress directory.
 * I tried using an RSSParser in Dreamweaver to reference the website, but the parser
   wants a .rss file and as near as I can tell, wordpress feeds are .php files. 
   I have used the Dreamweaver function before and it works on .rss, but not on 
   anything else.
 * I found another code example that should do exactly what i want it to do: a php
   line that calls on the following code (through a template)
 * <?php
    /* Template Name: Latest */ ?> <?php global $post; $myposts = get_posts(‘
   numberposts=4&category=8’); foreach($myposts as $post) : setup_postdata($post);?
   > “><?php the_title(); ?> <?php endforeach; ?>
 * I have the callout code on the main page and the code listed above in the ‘themes’
   of the wordpress folders. I have the following code on the main page:
 * <?php
    include(“blog/wp-content/themes/mine/latest-post.php”); ?> and it produces
   the following error:
 * Warning: include() [function.include]: Failed opening ‘TEMPLATEPATH/blog/wp-content/
   themes/mine/latest.php’ for inclusion (include_path=’.:/usr/local/php5/lib/php:/
   usr/local/lib/php’) in /home/.wycliffe/bmdavis/e.ner.gy/blog/wp-content/themes/
   mine/latest-post.php on line 2
 * I need either a solution to the dreamweaver problem or a way to get the include_path
   right.
 * Thanks…

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

 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/include_path-required-for-include/#post-698221)
 * This:
 *     ```
       <?php
       /*
       Template Name: Latest
       */
       ?>
       ```
   
 * says “I am a [Page template](http://codex.wordpress.org/Pages#Page_Templates),”
   which means it would only work as an included document (assigned as a Page’s 
   template, that is) within your WordPress blog. To incorporate WordPress functionality*
   outside* WordPress, you must first include the wp-blog-header.php file, as described
   here:
 * [http://codex.wordpress.org/Creating_a_Static_Front_Page#Integrating_WordPress](http://codex.wordpress.org/Creating_a_Static_Front_Page#Integrating_WordPress)
 *  Thread Starter [bmdavis](https://wordpress.org/support/users/bmdavis/)
 * (@bmdavis)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/include_path-required-for-include/#post-698499)
 * I appreciate the help, it worked. I was able to use the rest of the post you 
   linked to create the links I was looking for from my blog.
 * One more question, the code listed on the ‘static front page’ to create a mini-
   loop outputs the title of the posts. How do I also grab the date, category/topic,
   and the first few lines of the post?
 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/include_path-required-for-include/#post-698532)
 * Once you include wp-blog-header.php, you have access to any of WordPress’ functionality,
   including:
 * [http://codex.wordpress.org/Template_Tags/get_posts](http://codex.wordpress.org/Template_Tags/get_posts)
   
   [http://codex.wordpress.org/Template_Tags/query_posts](http://codex.wordpress.org/Template_Tags/query_posts)
 * There are a number of better and in some cases far easier solutions than the 
   basic query example provided on the Creating a Static Front Page doc.
 *  Thread Starter [bmdavis](https://wordpress.org/support/users/bmdavis/)
 * (@bmdavis)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/include_path-required-for-include/#post-698545)
 * that did it, thanks for your help.

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

The topic ‘‘include_path’ required for ‘include’’ is closed to new replies.

 * 4 replies
 * 2 participants
 * Last reply from: [bmdavis](https://wordpress.org/support/users/bmdavis/)
 * Last activity: [18 years, 3 months ago](https://wordpress.org/support/topic/include_path-required-for-include/#post-698545)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
