Community Forums › Forums › Archived Forums › General Discussion › Syntax Error – Can anyone help?
- This topic has 8 replies, 2 voices, and was last updated 7 years, 10 months ago by philacowboy.
-
AuthorPosts
-
June 6, 2016 at 6:30 am #187038philacowboyMember
Hi,
I am adding code to my header in Lifestyles Pro that will allow me to replace the default header with a header image in the php functions file. When I update the file I get the error message:
Parse error: syntax error, unexpected 'src' (T_STRING), expecting ',' or ';' in /home4/kurthiller/public_html/wp-content/themes/lifestyle-pro/functions.php on line 61
Line 61 reads:
echo ‘';
I can't seem to figure out where the error is in this line. I tried changing the ";" to a "," but that did nothing. Can anyone help?
Thanx,
philacowboyJune 6, 2016 at 6:46 am #187039Victor FontModeratorWhen I click on your image, I see the same error. You have an extra double quote in the link and it's of the curly variety that will always produce a syntax error:
<img src="//theglister.com/wp-content/uploads/2016/06/Logo-1.png”" />
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?June 6, 2016 at 7:43 am #187043philacowboyMemberHi Victor,
Thanks for responding so quickly. I've looked at the line 61 in my original php file and I imported the coding into Dreamweaver, but there is no indication that there is double quotation marks at the end of my url. Is this a glitch in what I am using? Is there a way to fix it?
Best regards,
philacowboyJune 6, 2016 at 7:46 am #187045Victor FontModeratorCan't really tell you without looking at the back end of the site, but if you use FireFox and view the page's source, you can see the extra character. It's also in the code you posted above. Click on the broken image in the first post and you'll see the double quote in the address bar of the browser.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?June 6, 2016 at 8:09 am #187047philacowboyMemberHi Victor,
I see what you saw in Foxfire. I went into the host Control Panel and opened up the functions php file. There is no indication of a double quotation mark. But I went ahead and deleted the code from "pgn" to ";" and typed it back in. I saved the edit then went to the website, but the error message is still there. It is so hard to believe that this is happening.
Best regards,
philacowboyJune 6, 2016 at 10:03 am #187051Victor FontModeratorCan you post the functions file on https://gist.github.com/ so we can see it.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?June 6, 2016 at 11:54 am #187056philacowboyMemberI place the functions php. file at gist.github.com titled "philacowboy's Problem Child (https://gist.github.com/anonymous/71f53ffc0c6e26a2d73577acda0bc598)
I got an email from Studiopress support that said:
It looks like you have incorrect quotes (curly instead of straight) around the custom code for your image.
I have no idea how to get straight quotes instead of curly quotes. There is no special function on my keyboard that I can find.
Best regards,
philacowboyJune 6, 2016 at 12:21 pm #187058Victor FontModeratorYes, that's the problem. Curly quotes are a function of whatever editing tool you are using. It has nothing to do with your keyboard. Here's the offending code with straight quotes.
//* Remove the default header remove_action ( 'genesis_header', 'genesis_do_header'); //* Add custom header add_action( 'genesis_header', 'sk_do_header'); function sk_do_header() { echo '<img src="http://theglister.com/wp-content/uploads/2016/06/Logo-1.png" />'; }
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?June 6, 2016 at 1:31 pm #187065philacowboyMemberHi Victor,
Everything seems to be working fine now. Thank you so much. I would never have been able to figure this conundrum out my own. I hope that this will help someone else that encounters the same problem. Thanks again.Best regards,
philacowboy -
AuthorPosts
- The topic ‘Syntax Error – Can anyone help?’ is closed to new replies.