Ejemplo n.º 1
0
function generatePagesSitemap()
{
    $sitemap = new Sitemap(SITE_DOMAIN);
    $sitemap->setPath(DOC_ROOT . '/');
    $sitemap->setFilename('page');
    $posts = new Posts();
    $sitemap->addItem('', '1.0', 'daily', 'Today');
    while ($row = $posts->getPostsLoop(null, 'page')) {
        $sitemap->addItem($posts->getPostPermLink($row['ID'], $row['post_type'], $row['link_title']), '0.8', 'weekly', $row['post_date']);
    }
    $sitemap->createSitemapIndex(SITE_DOMAIN, 'Today');
}
Ejemplo n.º 2
0
<?php

getHeaderCUSTOM();
$posts = new Posts();
$comments = new Comments(URI::getPageId());
$row = $posts->getPost(URI::getParams_single()['id']);
$posts->handlePostViewsById(URI::getPageId());
?>
        <?php 
include_once 'sidebar.php';
?>

        <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4 col-md-offset-1 col-lg-offset-1 div_white_left">
            <article class="post">
                <a href="<?php 
echo $posts->getPostPermLink($row['ID'], $row['post_type'], $row['link_title']);
?>
"><h3 style="font-weight: bold;"><?php 
echo strip_tags($row['post_title']);
?>
</h3></a>&nbsp;&nbsp;<span style="color: #808080;"><i style="vertical-align: middle;" class="mdi mdi-calendar"></i>&nbsp;<?php 
echo englishConvertDate($row['post_date']);
?>
&nbsp;<i style="vertical-align: middle;" class="mdi mdi-file"></i>&nbsp;<?php 
echo getCategoryById(getPostCategories($row['ID'])[0]);
?>
</span>
                <p><?php 
echo $row['post_excerpt'];
?>
</p>