WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using the twentyten theme with the bbpress plugin. I have the following in my header.php (twentyten):

    <div id="masthead">
        <div id="branding" role="banner">
            <h1><a href="<?php get_site_url(); ?>">TaiwanTalk</a></h1>
        </div><!-- #branding -->
        <div id="access" role="navigation">
            <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
        </div><!-- #access -->
    </div><!-- #masthead -->

get_site_url doesn't return anything. Any suggestions?

share|improve this question
up vote 2 down vote accepted

The functions that start with "get_" return the value to what's calling it. So you would do <a href="<?php echo get_site_url(); ?>"> instead to print out the URL.

share|improve this answer
Damn, I feel so stupid I always forget the echo stuff. Thanks! – janoChen Mar 13 '11 at 9:06
You're more than welcome. :) – Rob Williams Mar 13 '11 at 9:07

The function is located in wp-includes/link-template.php. You can take a look at the code here, and see if there are any conditions that look like they could be the problem. If not, then you can either debug, or use "echo" in order to see where the code goes, and what is missing

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.