Support » Themes and Templates » code/tag expert
10 years, 4 months ago
what would i add on that plugin code so that it would only show up in the main/home page? please help. thank you.
Do this: <?php if (is_home()) fquick_get(); ?>
<?php if (is_home()) fquick_get(); ?>
and you’ll want to put that in index.php
index.php is the default fallback template as well as the home page, but with is_home() as a condition, will only perform your plugin function when it is being called as the home page template.
Just for reference, home.php is technically the default fallback template for is_home
then if no home.php, WP looks for index.php
ah yes, and for more reference, read about Conditional_Tags, and see this list of template files and also relevant here, the Template Hierarchy.