Results 1 to 2 of 2

Thread: How to link to multisite-base url via php coding?

  1. #1
    Thread Starter
    luxor's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    599
    Thanks
    8
    Thanked 141 Times in 74 Posts

    How to link to multisite-base url via php coding?

    Well all know that the standard code is as follows:

    PHP Code:
    <?php get_site_url(); ?>
    or

    PHP Code:
    <?php echo network_site_url(); ?>
    However, i created a few sites based off of wordpress's multisite functionality.

    So I have the following.

    http://www.domain.com/site1/
    http://www.domain.com/site2/
    http://www.domain.com/site3/
    http://www.domain.com/site4/
    http://www.domain.com/site5/
    etc...

    If I place the above codes within any of the sites above, it just likes to the base domain - http://www.domain.com/

    for example -
    HTML Code:
    a href="<?php echo network_site_url(); ?>/about">Test Link</a>
    = http://www.domain.com/about/

    How do I make it so that I get http://www.domain.com/site1/about/ ?

    - - - Updated - - -

    Not sure if this matters or will help, but I am using the Vantage theme. So I'm not sure if there's some type of function or call that has already been created to make this work?

  2. #2
    Thread Starter
    luxor's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    599
    Thanks
    8
    Thanked 141 Times in 74 Posts
    PHP Code:
    <?php echo get_bloginfo('wpurl'); ?>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Dimitris Css coding in cp3.2 - Should this be like this?
    By bleem in forum ClassiPress General Discussion
    Replies: 3
    Last Post: December 12th, 2012, 01:04 PM
  2. Sitemap creater for ad category base URL and ad tag base URL
    By hkmtks in forum Report ClassiPress Bugs
    Replies: 2
    Last Post: September 12th, 2012, 11:07 AM
  3. Replies: 3
    Last Post: July 19th, 2011, 04:43 PM
  4. Need some coding help, please.
    By dmyers in forum ClassiPress General Discussion
    Replies: 3
    Last Post: October 17th, 2010, 02:31 AM
  5. Replies: 1
    Last Post: August 3rd, 2010, 04:09 AM