include problem with wp-blog-header.php
-
hi,
i am changing my server but i have problems.i installed four wordpress in one domain.
mydomain.com/blog mydomain.com/news mydomain.com/events mydomain.com/videos etc…
mydomain.com/blog’s blog url is mydomain.com and it is my front page. example, i show last mydomain.com/news posts with custom field image on this page with include method.include codes is not working my new server.
example:
<?php include 'https://www.mydomain.com/news/lastnews.php'; ?>
allow_url_include is Off on my new server php.ini file and my new server’s admins told me “we can’t change this. we suggest, ‘php_flag allow_url_include On’ add your .htaccess file.”
i did this but it is not working. i found this code for include.
<?php include $_SERVER['DOCUMENT_ROOT'].'/news/lastnews.php'; ?>
this include method is working but this code doesn’t show my last news (mydomain.com/news). this code show my last blog (mydomain.com/blog) posts. because lastnews.php is starting with
<?php $posts_per_page = '-1'; require_once('wp-blog-header.php');?>
code and wordpress think ‘wp-blog-header.php’ is for mydomain.com/blog. in fact, it for mydomain.com/news.
- The topic ‘include problem with wp-blog-header.php’ is closed to new replies.