WordPress.org

Ready to get started?Download WordPress

Forums

home_url() permalink issue (4 posts)

  1. lewisbassett
    Member
    Posted 3 years ago #

    When I have permalinks set up to anything other than the default "non-pretty" settings, the function "home_url()" does not generate a permalink to the homepage, but points to the current directory.

    You can see the issue here: http://www.bassettprovidentia.com

    I am very impressed with WordPress, but Permalinks has given me nothing but grief. Without permalinks, everything works as it should.

  2. Sennza Pty Ltd
    Member
    Posted 3 years ago #

    Perhaps try this:
    <?php echo home_url( '/' ); ?>
    Hopefully that will sort you out. If not then let me know and I'll suggest something else! :)

  3. lewisbassett
    Member
    Posted 3 years ago #

    Bronson,

    Thanks very much for your help. It worked!

  4. Sennza Pty Ltd
    Member
    Posted 3 years ago #

    No worries. Glad it helped!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags