index.php of the theme :
Code: Select all
<?php
if( ($Url->whereAmI()=='home') || ($Url->whereAmI()=='tag') )
{
include(PATH_THEME_PHP.'home.php');
}
elseif($Url->whereAmI()=='post')
{
include(PATH_THEME_PHP.'post.php');
}
elseif($Url->whereAmI()=='page')
{
include(PATH_THEME_PHP.'page.php');
}
elseif($Url->whereAmI()=='page' && ($Page->title()=='all'))
{
include(PATH_THEME_PHP.'archives.php');
}
?>
Code: Select all
<article class="post">
<!-- Plugins Page Begin -->
<?php Theme::plugins('pageBegin') ?>
<section class="post-header">
<header class="post-title">
<h1><?php echo $Page->title() ?></h1>
</header>
</section>
<section class="post-content">
<?php
$totalPublishedPosts = $dbPosts->numberPost();
$posts = buildPostsForPage(0, $totalPublishedPosts, true, false);
foreach($posts as $Post)
{
echo '<h1><a href="'.$Post->permalink().'">'.$Post->title().'</a></h1>';
}
?>
</section>
<!-- Plugins Page Begin -->
<?php Theme::plugins('pageEnd') ?>
</article>
What am I doing wrong?