bikeman123
Member
Posted 6 months ago #
I am using
<a href="<?php bloginfo(‘home_url’); ?>/newpage/">newpage</a>
in my theme
Something is wrong. Instead of linking to
http://www.domian.com/newpage/
it is linking to
http://www.domain.com/currentpage/sitetitle/newpage/
How can this happen?
Sorry the site is not live so I cant provide a link.
If you don't want the home URL, why not take it away?
This
<a href="/newpage/">newpage</a>
Should return http://www.domian.com/newpage/
By the way, you have weird apostrophes that could cause problems in the future.
bikeman123
Member
Posted 6 months ago #
Hi
Thanks for your reply but what you suggest doesn't work because the 'newpage' link will be relative to the current page and many of my pages are sub-pages of parents. So a link to newpage within http://www.domain/sub-page/ would end up at http://www.domain/subpage/newpage.
I need to use the siteurl to give me absolute links.