GetSimple Support Forum

Full Version: Hiding a Component on Homepage / index.php
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there,

is there any way to load a specific component on every site except the index / homepage / startscreen?
I do'nt need breadcrumbs on index /homepage, so i only want to display them on "subpages" of index.

Got no PHP-Skillz. :-(

Thanks & Greetings,
Edit your template and change:
<?php get_component('mycomponent'); ?>
<?php if (return_page_slug()!='index') get_component('mycomponent'); ?>

Or else, edit the component and enclose its contents between these code:
<?php if (return_page_slug()!='index') { ?>
... component content ...
<?php } ?>
More easier would be to make a seperate template and choose this template under the pageoptions of the indexpage

Yes, you're right. I forgot to mention that other solution.

(However I personally don't like that way, because if I have to do some change to the template, I must do it in both files - unless I split them in pieces with common code and use includes, like the Innovation theme does.)