WordPress.org

Support

Support » Themes and Templates » Link only on home page

Link only on home page

  • Hi

    Is there achance to put link to other site just on home page.

    I can’t put a link in header, footer, sidebar or index template because link will show on all pages. What should i do?

    Thanks for any help

    Regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • Use a conditional – is_home
    More: http://codex.wordpress.org/Conditional_Tags

    Thanks for help but i don’t know how to use it.

    This code should look like:

    <?php if ( is_home() ) : ?>
    <p>Bottom – jkfghjkdljdfmv</p>
    <?php endif; ?>

    When i use this above I have link on each page

    CAn anyone show me how this code should look like

    Thanks in advice

    Regards

    Any help?

    please help me with that code above

    This code should look like:

    <?php if ( is_home() ) : ?>
    <p>Bottom – jkfghjkdljdfmv</p>
    <?php endif; ?>

    When i use this above I have link on each page

    CAn anyone show me how this code should look like

    Thanks in advice

    Regards

    You need some understanding of PHP code to incorporate this into your page. ie. learn the PHP programming language if you want to know how this all works.

    However…

    You need to edit your index.php file (or one of the other theme files depending where you want this link to be displayed) to include the following code:


    if (is_home())
    {
    echo '<insert you link here>';
    }

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Link only on home page’ is closed to new replies.
Skip to toolbar