Alrighty... so I'm starting a new website based on Wordpress. I'm also using Thesis theme, which is a theme/framework for Wordpress that allows you to do a lot of neat stuff.
I'm trying to use this piece of code to replace the standard Blog Title and Blog Tagline text with a header image:
/* Custom Header Image */
function add_header_image () {
echo "<a href=\"http://www.yourblogurl.com/\" title=\"Your Blog Title\">
<img src=\"THE-URL-OF-YOUR-LOGO-GOES-HERE\" alt=\"Your Blog Title\" height=\"170\" width=\"528\" style=\"border:0px\" />
</a>";
}
add_action('thesis_hook_after_title', 'add_header_image');
When I add it to the php file it needs to go in to work... it works!
Quite literally, it works as long as I use the code as it's presented with fake urls and text.
But as soon as I change the 'Your Blog Title' or '
www.myactualwebsite.nl', it breaks and it gives me the following error:
parse error, unexpected T VARIABLE, expecting ',' or ';' This happens on the line containing 'echo'. I've tried again and again being careful not to touch the syntax that shouldn't be changed, but I haven't been able to pull it off.
I've done some searching and found some examples of this kind of code going wrong and a full stop or something missing or being in the wrong place. Unfortunately I'm not familiar with PHP at all. I'm hoping someone here is!
Is it a bad piece of code to begin with?