• Resolved Anonymous User 266005

    (@anonymized-266005)


    Hi everyone,

    I am trying to add a link pointing to another website, only on the home page of my WordPress blog. I tried to do this modifying the index.php but the link goes on the other pages too, when I click on next page.

    It seams that all of these pages are using the same template. If so, how can I create a template to be used only by index page of my blog?

    Or may be a php call, something like, if index add this link… (if you know php, please write the code in clear if is some helping me)

    Thanks a lot!
    Vic

Viewing 3 replies - 1 through 3 (of 3 total)
  • Can I have source code of sidebar.php here?

    Basically, you need to use is_home() condition to cover tags that generate the link.

    For example,

    <?php if(is_home): ?>
    // link generate here
    <?php endif; ?>

    BTW, show sidebar.php code here and we will see where to go.

    Thread Starter Anonymous User 266005

    (@anonymized-266005)

    Problem solved.

    [spam link moderated]

    the link can be added on any page you wanted not only on home /index page

    ninenote, it’s not about adding a link to the sidebar. The link can be placed anywhere you want on the page, on any page of your wordpress blog, you want.
    thanks anyway ??

    Hi, I need some help here
    I’m Using wordpress 2.9.2 and afterburner rocket theme.

    1. I want to insert images to sidebar and link it to another website.
    IS it possible to do so?

    2. And also, if i can link “Nextgen gallery slideshow widgets” to another website, that would be a great work.

    does anyone have some simple ideas about it?
    i tried to insert the URL in text sidebar, but didn’t work.
    here is site https://sandeshmalla.com.np

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add a link only to index/home page in WordPress’ is closed to new replies.