Ready to get started?Download WordPress


code/tag expert (5 posts)

  1. cristells
    Posted 8 years ago #

    <?php fquick_get();?>

    what would i add on that plugin code so that it would only show up in the main/home page? please help. thank you.

  2. pizdin_dim
    Posted 8 years ago #

    Do this: <?php if (is_home()) fquick_get(); ?>

  3. geoffe
    Posted 8 years ago #

    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.

  4. Michael Bishop

    Posted 8 years ago #

    Just for reference, home.php is technically the default fallback template for is_home

    then if no home.php, WP looks for index.php

  5. geoffe
    Posted 8 years ago #

    ah yes, and for more reference, read about Conditional_Tags, and see this list of template files and also relevant here, the Template Hierarchy.

Topic Closed

This topic has been closed to new replies.

About this Topic