2012-02-26, 10:00:00
ChriS Wrote:I'm only able to hack some obvious things. Maybe I will try; but I prefer to use the core or a well developed plugin. ;-)
If Carlos solution won't be sufficient, place below code in functions.php file (same directory as template.php) and call it function from template
Code:
function show_author($id){
$file = "data/pages/". $id .".xml";
if ( file_exists($file) ){
$data_index = getXML($file);
$author = 'stripslashes(html_entity_decode($data_index->user, ENT_QUOTES, 'UTF-8') );
}else{
$author="";
}
return $author;
}
and call it function from template below the function showing page's content (it depends of course on where you want to place author's name)
Code:
<?php echo show_author(return_page_slug()); ?>
Function will show empty string if page does not exist
ps. I didn't test this, but the code should work.
Addons: blue business theme, Online Visitors, Notepad