• I have a multisite install and the logo for the sub sites are all linking back to the main site. I would like the logo to link to home within the sub site.

    I have tried <?php echo get_home_url(); ?> and all variations of that and nothing is working.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hey try home_url(); instead.

    Thread Starter digital_jedi

    (@digital_jedi)

    thanks @kapils003. That did not work either. It is working for me locally but the website is hosted on wpengine. It is on wpengine that it is not working. I should have been more clear about that.

    then may be the problem is in your multi site setup.

    Because i am also working on multisite and used the same function as suggested and it worked for me.

    How about <?php echo get_home_url( get_current_blog_id() ); ?>

    Hi
    I want to do the exact opposit.
    By default each sub-site logo redirect to the homepage from sub-site.
    I want to redirect the logo from each sub-site to the main site.
    Any idea ?
    Thanks for help and sorry for my english.

    Hi franck_b.
    Just set blog id of your main site instead of get_current_blog_id().
    Something like <?php echo get_home_url( 1 ); ?>, when main site id is 1.
    If that is not what you need, you’d better set new thread for your case.

    Hi Ikaring
    i have a lot of header.php and i modify this line:
    <a href="<?php echo esc_url(home_url('/')); ?>" class="logo"
    but nothing work.
    Thank you for your help.

    • This reply was modified 7 years, 6 months ago by franck_b.

    There is network_home_url() for multisite.
    Pls check out Codex below.

    https://codex.www.ads-software.com/Function_Reference/network_home_url

    Hi, i have the same problem, i want redirect the logo of subsites to site, how can i get it? THANKS

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Multisite logo all linking to main site’ is closed to new replies.