Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Three Boxes on Homepage
#8
An easier option would be to create your main page.

Then create 3 child pages for each of the columns.

Add the following to your template functions.php file

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 in your template just add 3 of the following in each of the columns, replacing $page with your sub-page names.

Code:
<?php get_content($page); ?>

That way the client just updates the 3 sub pages.

Edit: in version 3.1+ you can forget about the function and just use the inbuilt caching/indexing.

Code:
<?php getPageContent($page); ?>
My Github Repos: Github
Website: DigiMute
Reply


Messages In This Thread
Three Boxes on Homepage - by designthing - 2011-07-05, 00:17:24
Three Boxes on Homepage - by polyfragmented - 2011-07-05, 06:38:00
Three Boxes on Homepage - by yojoe - 2011-07-05, 10:35:02
Three Boxes on Homepage - by ccagle8 - 2011-07-05, 21:59:16
Three Boxes on Homepage - by yojoe - 2011-07-05, 23:07:50
Three Boxes on Homepage - by ccagle8 - 2011-07-05, 23:16:40
Three Boxes on Homepage - by designthing - 2011-07-06, 00:09:40
Three Boxes on Homepage - by n00dles101 - 2011-07-06, 00:19:01



Users browsing this thread: 1 Guest(s)