Site logo

Archived topic

Page Header

19 replies · Started by Daren on January 12, 2018

Viewing posts 1–15 of 20

Hi Tom, Leo,

can you advise me on the best way to animate text in the page header? I want to have an <h1> heading rotate from three different headings, set to change every 5 seconds or so.

Thank you,
Daren

Thank you, I'll check them out.

Daren

Got a problem here. I added the code from treehouse into the code snippets plugin and it crashed the entire site. Said a fatal error with line four and now whenever I try to access the site I get this on a white page:

Parse error: syntax error, unexpected 'var' (T_VAR) in /home/darenj5/audiojaramillo.com/wp-content/plugins/code-snippets/php/snippet-ops.php(433) : eval()'d code on line 4

Going to go into the ftp and se if I can delete something there

So I went into the file manager in cpanel and deleted the code snippets plugin and I can access my site again. Do you know what might have caused this by what I pasted in the previous mesage - eval()'d code on line 4. It also singled out the var keyword.

Getting weirder. I just tried to re-install code snippets and instantly got the same screen...

I moved the parallax code into the footer hook and it is working fine. The thing is I can not install the code snippets plugin anymore. Each time I do I get the fatal error page.

Hi Tom, thanks, I'll give this a try.

Any thoughts on what happened?

Daren

That code is javascript, not PHP. PHP isn't very forgiving, so any syntax errors will cause PHP errors like you encountered.

Once again, thank you Tom. All good now.

You're welcome :)

With the goal of self-reliance in mind, what did you search for when thinking about a fix for this? Was it more the experience you have as a developer and have seen this before? Or was there a clue you saw that made you say "gotta search for this or that? I was surprised to see the same code in Code Snippets once I enabled safe mode and was able to get in there and check it out. I just assumed that because I deleted the plugin, then re-installed it, I would be getting a fresh install of Code Snippets.

Daren

Just out of experience - safe mode in that plugin disable the PHP entirely, which prevents the error from happening in the first place. That allows you to delete the snippet from the database completely (or fix the error).

Then safe mode can be removed and everything is good to go.

This archived topic is closed to new replies.