Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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 '' and so location should be set to ''

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

share|improve this question

1 Answer 1

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.