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.

1 Answer 1


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



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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