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 writing a function to make all of my header images link to their respective home pages. I wrote this function:

    function get_category_location(){
    $header = get_category_header();
    $home = bloginfo('url');

    if ($header == 'wth') {
        $location = $home . "/wth/" ;

    else if ($header == 'campus' || $header == 'tech') {
        $location = get_category_link();

    else {$location = $home;}

    return $location;


so when you click a header in the wth section of our site $header should equal 'wth' and $home should equal 'http://dev.reesenews.org' and so location should be set to 'http://dev.reesenews.org/wth/'

as far as I can tell $header and $home are correct.

share|improve this question
up vote 1 down vote accepted

you are storing the value into a variable you need to use



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.