Posts: 24
Threads: 6
Joined: Sep 2011
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,
Rob
:-)
Posts: 3,491
Threads: 106
Joined: Mar 2010
Edit your template and change:
Code:
<?php get_component('mycomponent'); ?>
to:
Code:
<?php if (return_page_slug()!='index') get_component('mycomponent'); ?>
Or else, edit the component and enclose its contents between these code:
Code:
<?php if (return_page_slug()!='index') { ?>
... component content ...
<?php } ?>
Posts: 73
Threads: 7
Joined: Jul 2011
2012-03-06, 01:37:50
(This post was last modified: 2012-03-06, 01:38:03 by michael420.)
More easier would be to make a seperate template and choose this template under the pageoptions of the indexpage
Posts: 3,491
Threads: 106
Joined: Mar 2010
@m1k3y
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.)