Title: problem
Last modified: August 20, 2016

---

# problem

 *  [bikeman123](https://wordpress.org/support/users/bikeman123/)
 * (@bikeman123)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/problem-36/)
 * 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/](http://www.domian.com/newpage/)
 * it is linking to
    [http://www.domain.com/currentpage/sitetitle/newpage/](http://www.domain.com/currentpage/sitetitle/newpage/)
 * How can this happen?
 * Sorry the site is not live so I cant provide a link.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [13 years, 6 months ago](https://wordpress.org/support/topic/problem-36/#post-3255716)
 * 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.
 *  Thread Starter [bikeman123](https://wordpress.org/support/users/bikeman123/)
 * (@bikeman123)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/problem-36/#post-3255717)
 * 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/](http://www.domain/sub-page/)
   would end up at [http://www.domain/subpage/newpage](http://www.domain/subpage/newpage).
 * I need to use the siteurl to give me absolute links.
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/problem-36/#post-3255724)
 * review
 * [http://codex.wordpress.org/Function_Reference/bloginfo](http://codex.wordpress.org/Function_Reference/bloginfo)
 * or
 * [http://codex.wordpress.org/Function_Reference/home_url](http://codex.wordpress.org/Function_Reference/home_url)
 * possibly (untested):
 *     ```
       <a href="<?php echo home_url('/newpage/'); ?>">newpage</a>
       ```
   

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘problem’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [Michael](https://wordpress.org/support/users/alchymyth/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/problem-36/#post-3255724)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
