Hack: Get WordPress Page outside of install
-
Hi There!
I have successfully grabbed posts outside of WordPress before by including
wp-blog-header.php
, but this time I am trying to grab a specific WordPress Page. So far I haven’t found a way to get a specific page_ID outside of the application. Any suggestions?//Header include <?php define('WP_USE_THEMES', false); require('./blog/wp-blog-header.php'); ?>
// Content will follow in body of html document - below is // what I used to get posts (modified). I need a PAGE this time. <div id="pressContent"> <?php $args1 = array('page_ID=20'); query_posts($args1); $posts = get_posts('page_ID=20'); foreach ($posts as $post) : start_wp(); ?> <p><?= $the_content(); ?></p> <?php endforeach; ?> </div>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Hack: Get WordPress Page outside of install’ is closed to new replies.