2015-09-13, 06:44:25
Hello,
So i have successfully used this: http://get-simple.info/forums/showthread.php?tid=6629
In order to pull page content and then i created a function to pull the page title as well
and i can now use:
<?php getPageTitle($child); ?>
So, now all i need to do is pull the date for the child pages.
However, i can't figure out how to do a function to be able to pull the child page date because the date function is created in theme_functions and not caching_functions.
So how would i go about pulling the child pages correct date?
Currently i can either display the main pages date or what is currently displaying.
If someone could help me in pulling the child pages date without any plugins that would be great
Since i don't want to have to go through and manually add pages to the file. I want it done automatically so this is why I'm doing it this way.
Thanks
- Alex
So i have successfully used this: http://get-simple.info/forums/showthread.php?tid=6629
In order to pull page content and then i created a function to pull the page title as well
Code:
function getPageTitle($page,$field='title'){
$thisfile = file_get_contents(GSDATAPAGESPATH.$page.'.xml');
$data = simplexml_load_string($thisfile);
$title = stripslashes(htmlspecialchars_decode($data->$field, ENT_QUOTES));
if ($field=='title'){
$title = exec_filter('title',$title);
}
echo $title;
}
and i can now use:
<?php getPageTitle($child); ?>
So, now all i need to do is pull the date for the child pages.
However, i can't figure out how to do a function to be able to pull the child page date because the date function is created in theme_functions and not caching_functions.
So how would i go about pulling the child pages correct date?
Currently i can either display the main pages date or what is currently displaying.
If someone could help me in pulling the child pages date without any plugins that would be great
Since i don't want to have to go through and manually add pages to the file. I want it done automatically so this is why I'm doing it this way.
Thanks
- Alex