thepterodactyl
Member
Posted 2 years ago #
Im using the K2 template and trying to remove my navigation on my homepage but keep it on the subsequent pages. Can anybody give me an idea or the code to do something like this? Would it be possible to use a custom field to say that if the page is "home" then don't show the navigation?
You could wrap the menu code in a Conditional Tag in your header template to exclude it on the homepage.
Something to the effect of
<?php if (!is_front_page) {
// nav code
} ?>
thepterodactyl
Member
Posted 2 years ago #
Will it work if I place to the conditional around the following? Won't that break it? Im not a PHP code person so Im clueless what to write...Can anybody help?
<?php if (is_single()) { ?>
<div class="navigation">
<?php previous_post_link('<div class="left"><span>«</span> %link</div>') ?>
<?php next_post_link('<div class="right">%link <span>»</span></div>') ?>
<div class="clear"></div></div>
<?php } else { ?>
<div class="navigation">
<?php $_SERVER['REQUEST_URI'] = preg_replace("/(.*?).php(.*?)&(.*?)&(.*?)&_=/","$2$3",$_SERVER['REQUEST_URI']); ?>
<div class="left"><?php next_posts_link('<span>«</span> '.__('Older Entries','k2_domain').''); ?></div>
<div class="right"><?php previous_posts_link(''.__('Newer Entries','k2_domain').' <span>»</span>'); ?></div>
<div class="clear"></div>
</div>
<?php } ?>