Extra space after bloginfo()
I posted this in trouble-shooting and never got an answer, so thought I’d try here. I’m leaning toward it being a WordPress bug at this point (for any moderators watching out there):
Small issue I can’t figure out, and it may be because of my unfamiliarity with PHP syntax:
I have the following:
<?php $folioThumb = (bloginfo(‘wpurl’) . ‘/wp-content/uploads/folio/’ . get_post_meta($post->ID, ‘folioThumb’, TRUE)); ?>
which when echoed outputs:
You may have noticed the problem, which is that there is a space after the domain URL (bloginfo(‘wpurl’)). I can’t figure out how to get rid of this extra space, which is screwing up the filepath. Any ideas? Is it a syntax error on my end?
An example page can be seen here:
A few updates that I’ve tried:
1. I tried trim() around the bloginfo() function, no change.
2. I did a var_dump for bloginfo() and got http://domain.comNULL
3. The problem only seems to occur when I concatenate other strings/values to the end of the bloginfo() output.
4. I tried using the bloginfo(‘url’) instead of bloginfo(‘wpurl’), but this didn’t make any difference.
Any help at all is appreciated.
- The topic ‘Extra space after bloginfo()’ is closed to new replies.