Is this possible in Wordpress ??

Discussion in 'WordPress' started by deluxdon, Jul 19, 2010.

  1. #1
    Hello,

    I want to add link in my wordpress blog which is only visible on internal pages+posts (not on homepage).

    Which code i need to use for this ?

    I know how to add homepage link only so please don't post code for that.

    DON.
     
    deluxdon, Jul 19, 2010 IP
  2. pulsecontent

    pulsecontent Peon

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You may try this code

    <?php if ( [B]is_page()[/B] || [B]is_single()[/B] ) { echo '<div id="internalpagelink">
    <a href="http://www.digitalpoint.com/work/">Your Link Anchor Here</a></div>' ; } ?>
    Code (markup):
     
    pulsecontent, Jul 19, 2010 IP
  3. deluxdon

    deluxdon Catch Me If You Can...!!!™ Staff

    Messages:
    25,482
    Likes Received:
    1,943
    Best Answers:
    32
    Trophy Points:
    480
    #3
    It works but still link is not visible on 'Archive' pages.

    DON.
     
    deluxdon, Jul 19, 2010 IP
  4. bhuthecoder

    bhuthecoder Member

    Messages:
    245
    Likes Received:
    11
    Best Answers:
    1
    Trophy Points:
    43
    #4
    include this
    is_archive()
    Code (markup):
     
    bhuthecoder, Jul 19, 2010 IP
  5. pulsecontent

    pulsecontent Peon

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Sorry Don am travelling... Anyways here's the new code..

    <?php if ( [B]is_page()[/B] || [B]is_single()[/B] || [B]is_archive()[/B]  ) { echo '<div id="internalpagelink">
    <a href="http://www.digitalpoint.com/work/">Your Link Anchor Here</a></div>' ; } ?>
    Code (markup):
    Hope it helps...

    Pulse Content
     
    pulsecontent, Jul 19, 2010 IP