HTML Link from home page to sub page

Quick question.

I am making a default theme and layout that will be cloned when a new member signs up. I am putting in default forms, images, posts, etc.

In the widgeted sidebar, I have an image that links to one of my pages where there is a lead gen form. When the site is cloned, the I don't want the image to link to http://SITEONE.com/subpage, I want it to go to http://SITETWO.com/subpage.

So, in the HTML I put <img class="a.......................etc.

This works, but only if they are on the homepage. If you click the sidebar on a subpage, it tries to link to http:SITETWO/subpage/subpage and doesn't work.

How do I code this link so it pulls from the home page url all the time rather than from the page the person is on.

Hope this makes sense. I confused myself.

  • Mason

    Hiya Ben!

    I am making a default theme and layout that will be cloned when a new member signs up. I am putting in default forms, images, posts, etc.

    Are you using our New Blog Template plugin for this?

    In the widgeted sidebar, I have an image that links to one of my pages where there is a lead gen form.

    Are you creating this through the text widget or directly in the theme? The text widget won't allow PHP.

    If it's gonna be the same on each page I'd write it into your theme's sidebar or page template file. Perhaps this was actually your question anyway?

    In that case, it'd look like this:
    href="<?php $bloginfo = get_bloginfo( 'siteurl' ); ?>/subpage/"

    That'll call the individual site's homepage and then whatever page or post you have created.

    Hope this helps! Let us know if you need anything further! :smiley:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.