WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Wanting something to be displayed on my 1st post page (home page), not elsewhere (3 posts)

  1. Sarahe
    Member
    Posted 4 years ago #

    Hi Everyone,
    I'm currently trying to get a link to show up on just one page on my website ( http://www.greysgabble.com ) I've tried the is_home function and the && !is_paged function, but it still shows up on every page!!

    This is the code I currently have:

    <h2><u>Watch</u></h2>
    <?php
    // Full Episodes
    if ( (is_home())&&!(is_paged()) );
    {
            echo 'Full <a href="http://www.fancast.com/tv/Greys-Anatomy/5040/full-episodes" target="_blank">Greys Anatomy</a> Episodes';
    }
    ?>
    <br /><br />

    Which won't work. Every time I load up my older posts pages the link and text is still there.

    And I need it to not appear on my 'pages' either, just the first post page, which is the domain address (http://www.greysgabble.com)

    I'm very much a coding novice, so I'm not sure how to go about this any more that I have. :(

    Help is grately appreciated. Also, I've left the link up on the website now, so that if you want to see where it sits and if it disappears for you, you can. :)

    Thanks again.

  2. Michael Fields
    Themer
    Posted 4 years ago #

    Maybe try:

    <h2><u>Watch</u></h2>
    <?php
    // Full Episodes
    if ( is_front_page() && !is_paged() ) {
    	print 'Full <a href="http://www.fancast.com/tv/Greys-Anatomy/5040/full-episodes" target="_blank">Greys Anatomy</a> Episodes';
    }
    ?>
    <br /><br />
  3. Sarahe
    Member
    Posted 4 years ago #

    Thank you so much!!
    That worked perfectly. :D

Topic Closed

This topic has been closed to new replies.

About this Topic