- This topic has 19 replies, 3 voices, and was last updated 6 years, 3 months ago by Tom.
-
AuthorPosts
-
January 12, 2018 at 7:11 am #469254Daren
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,
DarenJanuary 12, 2018 at 9:19 am #469364LeoStaffCustomer SupportHi there,
You will need to take a look at something like this: https://codepen.io/amritleone/pen/qERPmW
January 12, 2018 at 9:22 am #469367TomLead DeveloperLead DeveloperThis is worth checking out as well: https://teamtreehouse.com/community/topic-text-with-changing-word-jquery-or-css
January 12, 2018 at 9:54 am #469394DarenThank you, I’ll check them out.
Daren
January 12, 2018 at 10:36 am #469444DarenGot 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
January 12, 2018 at 10:45 am #469455DarenSo 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.
January 12, 2018 at 11:18 am #469481DarenGetting weirder. I just tried to re-install code snippets and instantly got the same screen…
January 12, 2018 at 2:07 pm #469624DarenI 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.
January 12, 2018 at 6:50 pm #469740TomLead DeveloperLead DeveloperThis should help: https://github.com/sheabunge/code-snippets/wiki/Safe-Mode
Let me know ๐
January 13, 2018 at 3:48 am #469865DarenHi Tom, thanks, I’ll give this a try.
Any thoughts on what happened?
Daren
January 13, 2018 at 9:19 am #470088TomLead DeveloperLead DeveloperThat code is javascript, not PHP. PHP isn’t very forgiving, so any syntax errors will cause PHP errors like you encountered.
January 13, 2018 at 9:31 am #470101DarenOnce again, thank you Tom. All good now.
January 13, 2018 at 9:33 am #470104TomLead DeveloperLead DeveloperYou’re welcome ๐
January 13, 2018 at 9:36 am #470110DarenWith 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
January 13, 2018 at 9:37 am #470112TomLead DeveloperLead DeveloperJust 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.
-
AuthorPosts
- You must be logged in to reply to this topic.