WordPress.org

Ready to get started?Download WordPress

Forums

Visit site button URL (3 posts)

  1. DMityaev
    Member
    Posted 5 years ago #

    Hello!
    I did not find any topic about this issue...
    I need the "Visit Site" button to point to my actual site (root page), not to the blog. How to do it?
    Thanks in advance!

  2. JarretCade
    Member
    Posted 5 years ago #

    You are going to need to edit the code inside of the wp-admin/admin-header.php file. Make sure you make a backup/copy of this file before making changes in case something goes wrong.

    Once you have the admin-header.php file open look for the following line of code:

    <img id="header-logo" src="../wp-includes/images/blank.gif" alt="" width="32" height="32" /> <h1 <?php echo $title_class ?>><a href="<?php echo trailingslashit( get_bloginfo('url') ); ?>" title="<?php _e('Visit site') ?>"><?php echo $blog_name ?> <span>&larr; <?php _e('Visit site') ?></span></a></h1>

    Within this line of code you are going to want to modify

    <a href="<?php echo trailingslashit( get_bloginfo('url') );?>" title="<?php _e('Visit site') ?>">

    Just change the above code inside of href="" to whatever URL that you want the link to point to.

  3. pixelmac
    Member
    Posted 4 years ago #

    Hi there,

    How do I make the same but not for the admin section ?
    I want to change the logo url to visit another site when clicked.

    Thanks

    Dan

Topic Closed

This topic has been closed to new replies.

About this Topic