WordPress.org

Ready to get started?Download WordPress

Forums

Current Link? (3 posts)

  1. benz0r
    Member
    Posted 4 years ago #

    I need a code snippet just like: <?php the_permalink();?> which works with the home page as well.

    For example:

    Right now, If I were to put this code in my index.php it would output the permalink to the first post. But it works fine on the posts. I need something similar that works on the index.php, so it would output: http://example.com/ instead of the permalink to the first post.

  2. alchymyth
    Forum Moderator
    Posted 4 years ago #

    try and use <?php bloginfo('url'); ?>

  3. benz0r
    Member
    Posted 4 years ago #

    That won't work, I'm trying to use one global tag. I figured it out though.

Topic Closed

This topic has been closed to new replies.

About this Topic