Re: [SOLVED] Onepager Theme
Posted: Wed Jan 24, 2018 4:43 pm
I understand the new feature causes this.
Below is a small snippet of code I'm using to hide the "home" and "404" in the blog list page.
Let me know if you need any help, the important bit for you is mostly:
Below is a small snippet of code I'm using to hide the "home" and "404" in the blog list page.
Code: Select all
<?php if (wCMS::$currentPage == 'home'): ?> <!-- What page to display the blog posts on (default: home) -->
<?php
foreach ( wCMS::db()->pages as $pageName => $page ): ?>
<?php // Don't display 404 page
if($pageName == '404' || $pageName == "home") { // Don't show the "home" page and "404" page in the blog/page list (default: 404, home)
echo "";
} else { // Display blog title + link and keywords/tags
?>
<div class="paddingLeftRight20">
<h3 class="page-header">
<small> <span class="glyphicon glyphicon-calendar"></span> <?=$page->date; ?></small><br />
<strong class="blue"><a href="<?=$pageName?>"><?=$page->title; ?></a></strong> <!-- Blog post title + link -->
</h3>
<p class="small text-right darkText"><?=$page->keywords; ?></p>
</div>
<?php } endforeach; ?>
<?php endif ?>
Code: Select all
if($pageName == '404' || $pageName == "home") { // Don't show the "home" page and "404" page in the blog/page list (default: 404, home)
echo "";
} else {
// show all other pages/blog
}