Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linking back to home page in wordpress

So I have WordPress installed in a subdirectory of my website with permalinks set up.

I have my website set up like so:

-index.php
-style.css
-/contact
---index.php
-/blog
---(Wordpress installation)

So my problem is, whenever I use an <a href="../">Home</a> to link back to my homepage, it only works from my main blog page. If I go to a permalink post it takes me back to the blog home.

What I'm wondering is, is there a way to link back to the main page on both my blog home, and a permalink post? If i use ../../ it works on the post, but not the blog home.

I hope I worded this clearly enough, if I missed anything please let me know. Any help greatly appreciated, thanks.

like image 303
Sidetracking Avatar asked Oct 15 '12 03:10

Sidetracking


1 Answers

<a href="<?php echo home_url(); ?>">Home</a>

See: http://codex.wordpress.org/Function_Reference/home_url

like image 135
coderabbi Avatar answered Sep 18 '22 16:09

coderabbi