• I’m working with 3.0-alpha in multisite mode (using subdirectories), and have run across an issue with the get_blogaddress_by_name() function.

    I used that function to pull in the link for the main blog in the theme for blog 2, and it worked as expected (get_blogaddress_by_name(‘Main’) returns https://domain.tld/).

    However, when I include it in a custom function in functions.php in the blog 2 theme, it is not returning just the url, it is also appending the name of the blog to the end of the url (get_blogaddress_by_name(‘Main’) returns https://domain.tld/Main/).

    I’ve searched the forums and Trac for anyone else experiencing this issue, and found nothing.

    Is this expected behavior or a bug?

Viewing 1 replies (of 1 total)
  • Thread Starter kpdesign

    (@kpdesign)

    Quick update: I changed that function to use get_blogaddress_by_id() instead, and it returns the correct URL for the main blog.

    Would still like to know why get_blogaddress_by_name is appending the blog name to the url when using subdirectories.

Viewing 1 replies (of 1 total)
  • The topic ‘get_blogaddress_by_name() issues’ is closed to new replies.