EziSites Content From Separate Page Without ID

July 27, 2019

Working with EziSites 3.04, pretty URLs in permalink settings must be enabled. Nulla fringilla, orci ac euismod semper, magna diam porttitor mauris, quis sollicitudin sapien justo in libero. Vestibulum mollis mauris enim. Morbi euismod magna ac lorem rutrum elementum. Donec viverra auctor lobortis. Pellentesque eu est a nulla placerat dignissim. Morbi a enim in magna semper bibendum. Etiam scelerisque, nunc ac egestas consequat, odio nibh euismod nulla, eget auctor orci nibh vel nisi. Aliquam.

  • Level: Very Easy
  • Duration: 10 minutes
  • Author: Master

Nulla fringilla, orci ac euismod semper, magna diam porttitor mauris, quis sollicitudin sapien justo in libero. Vestibulum mollis mauris enim. Morbi euismod magna ac lorem rutrum elementum. Donec viverra auctor lobortis. Pellentesque eu est a nulla placerat dignissim. Morbi a enim in magna semper bibendum. Etiam scelerisque, nunc ac egestas consequat, odio nibh euismod nulla, eget auctor orci nibh vel nisi. Aliquam.Nulla fringilla, orci ac euismod semper, magna diam porttitor mauris, quis sollicitudin sapien justo in libero. Vestibulum mollis mauris enim. Morbi euismod magna ac lorem rutrum elementum. Donec viverra auctor lobortis. Pellentesque eu est a nulla placerat dignissim. Morbi a enim in magna semper bibendum. Etiam scelerisque, nunc ac egestas consequat, odio nibh euismod nulla, eget auctor orci nibh vel nisi. Aliquam.

[php]

//PERFORMS MYSQL QUERY TO GET THE POST ID
//note: ‘about’ is the name of the page, you can use any named, ex: ‘web services’
$about_page_id = $wpdb->get_var(“SELECT ID FROM $wpdb->posts WHERE post_name = ‘about'”);

$post_id = get_post($about_id);
$content = $post_id->post_content;

//applies wordpress filter (includes

tags)
$content = apply_filters(‘the_content’, $content);

$content = str_replace(‘]]>’, ‘]]>’, $content);

echo $content;
?>
[/php]

6 comments

  1. tsiger - January 22, 2011 12:10 pm

    Nice one!

    Reply
    • tsiger - January 22, 2011 12:10 pm

      Custom post relationships plugin looks good!

      Reply
  2. Johann - March 29, 2011 2:25 am

    Very nice theme!

    Reply
  3. EuroVPS - April 1, 2011 9:39 am

    Awesome theme. Definitely going to use this one.

    Reply
  4. 骆驼户外 - June 20, 2012 3:50 am

    VERY NICE

    Reply
  5. Xuejin.Moo - September 1, 2012 2:02 pm

    Look!It has been out of bounds to a good solution.

    Reply

Have your say