WordPress.org

Ready to get started?Download WordPress

Forums

Changing a call to show only on homepage (2 posts)

  1. kp2575
    Member
    Posted 5 years ago #

    I have a banner that I only want to show on the homepage as well as a banner I want to show throughout the site and it is in a section that is the same throughout the site in my theme.

    I created in my wordpress theme another section that is coded the same but with the different banner code:

    topnavigation.php
    topnavivationhome.php

    I placed this code in the mainindextemplate.php

    <?php if ( is_home() ) { include ('topnavigationhome.php'); } ?>
    <?php if ( is_links() || is_category() || is_archive() || is_page() || is_single() { include ('topnavigation.php'); } ?>

    Which completely messes up my site and causes it not to load. Just wondering what the correct way to go about doing this? I am obviously doing something wrong.

  2. Evita
    Member
    Posted 5 years ago #

    Look here.

Topic Closed

This topic has been closed to new replies.

About this Topic