GetSimple Support Forum

Full Version: include based on index
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi

I am trying to make make my own theme, and need a conditional snip to include an element if in homepage (index).

I know I could create two files and pick one for index, and the other for other pages, but would like to just add a snip to the template.php file.

I am not a coder so I am asking for the php code to do this.

Thank you
PHP Code:
<?php if (return_page_slug() == 'index') { ?>

conditional HTML goes here...

<?php ?>
(2016-02-11, 04:33:07)Carlos Wrote: [ -> ]
PHP Code:
<?php if (return_page_slug() == 'index') { ?>

conditional HTML goes here...

<?php ?>

Thank you.

Much simpler than I thought.