Advertisement
amjithps

Untitled

Aug 27th, 2015
511
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.25 KB | None | 0 0
  1. $query = new WP_Query(array(
  2.         'post_type' => 'page',
  3.         'posts_per_page' => 1,
  4.         'id' => 4, // here the 'about' is the page slug you stored in wordpress when creating the page
  5. ));
  6. $page = $query->get_posts();
  7. $page = array_shift($page);
  8. return $page;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement