PHP Include
-
I have multiple blogs that are for different parts of one large organization. I am trying to create a global expandable header that shows links from all the different blogs For example, let’s say I have a blog called Boys and and a blog called Girls (at mysite.com/boys/ and mysite.com/girls). I created a template file that is called page-exports.php on each blog that has the following code:
<?php /* Short and sweet */ require('http://www.mysite.com/boys/wp-load.php');?> <?php wp_list_pages('include=3,4,5,6,7,8,9&title_li='); ?>I then reference it in the global header by using a PHP include:
<?php include('http://www.mysite.com/boys/wp-content/themes/mytheme/page-exports.php'); ?>So this is supposed to output a list of pages in the header. But nothing is displayed.
Any ideas? Thanks.
The topic ‘PHP Include’ is closed to new replies.