Custom index title tag (with a component)

If you want your homepage to have a customized title tag different to the default for all pages, you can do this.

1. Create a component 'titletag' with this content (edit 2nd and 4th lines to what you wish):

<?php if (return_page_slug()=='index') { ?>
This is my homepage's custom title tag...
<?php } else { ?>
<?php get_page_clean_title(); ?> - <?php get_site_name(); ?>
<?php } ?>

2. Edit your theme's template.php file (and/or others...) or header.php (if using Innovation theme), look for the <title>...</title> line and replace it with:

<title><?php get_component('titletag'); ?></title>

That's it.

(Posted in GetSimple's forum)

blog comments powered by Disqus