The MU forums have moved to WordPress.org

The most stupid question...:-) (10 posts)

  1. sgrunt
    Member
    Posted 15 years ago #

    Hi guys, this a really stupid question but i can't go out.

    I have a main blog, and some sub blogs, as usual.
    I want to put a link in every sub blog menu, that links back to the homepage of the main blog. What's that link?

  2. andrea_r
    Moderator
    Posted 15 years ago #

    The main blog URL? yourdomain.com.

    Or do you mean the code to generate it?

  3. VentureMaker
    Member
    Posted 15 years ago #

    Actually, it's URL to your homepage :) Or what is that you wanted to know?

  4. sgrunt
    Member
    Posted 15 years ago #

    yes Andrea, i mean that code, cause i'm creating a theme and it will be used from different users and websites. I've also installed buddypress so i've tried echoing $bp->root_domain; but it does not work for me

  5. tdjcbe
    Member
    Posted 15 years ago #

    Seen worse, trust me. :)

    What we do on our installs is either edit the meta widget in wp-includes/widgets.php from the wp.org link to the site's main address or hook into wp_footer() like so:

    <?php
    
    function footer_insert() {
    $code = '
    <div align="center"><a href="http://mywpmuinstall.tld/" target="_blank">Hosted by mywpmuinstall</a></div>
    ';
    echo $code;
    }
    add_action("wp_footer", "footer_insert");
    ?>

    We just hard code the link as such and install it as a mu-plugin.

  6. andrea_r
    Moderator
    Posted 15 years ago #

    And my menu could you please clarify? I use it to refer to the nav bar made with pages, but some people use it to refer to sidebars.

  7. sgrunt
    Member
    Posted 15 years ago #

    I refer to the nav bar in the header.php file. I need to create a link that always leads to the main blog homepage, from all the sub blogs. Thanx!

  8. sgrunt
    Member
    Posted 15 years ago #

    hi, some news about this? i hate to be boring, i'm really blocked from this little problem. thnx!

  9. SteveAtty
    Member
    Posted 15 years ago #

    Well you could simply hard code it into the sidebars on each theme

  10. sgrunt
    Member
    Posted 15 years ago #

    i can't Steve. I distribuite free themes, and so every user will got his own url, i could ask everyone to hardcore his url but this could be a problem, you know.

    however i'm talking about the header nav and not the sidebar. tnx

About this Topic