Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
get_page_content('pageID');
#2
Hi,

You will be able to do this in 3.1 but as thats not released yet..
you can add the follwoing function to your themes functions.php

Code:
function get_content($page){  
        $path = "data/pages";
        $thisfile = @file_get_contents('data/pages/'.$page.'.xml');
        $data = simplexml_load_string($thisfile);
        echo stripslashes(htmlspecialchars_decode($data->content, ENT_QUOTES));;
}

then just use get_content('pageslug');

hope it helps....

Mike.
My Github Repos: Github
Website: DigiMute
Reply


Messages In This Thread
get_page_content('pageID'); - by glennb - 2011-10-15, 03:18:25
get_page_content('pageID'); - by n00dles101 - 2011-10-15, 03:35:52
get_page_content('pageID'); - by glennb - 2011-10-15, 03:41:13
get_page_content('pageID'); - by n00dles101 - 2011-10-15, 03:46:39
get_page_content('pageID'); - by yojoe - 2011-10-16, 21:08:02
get_page_content('pageID'); - by mvlcek - 2011-10-16, 21:20:12



Users browsing this thread: 1 Guest(s)