• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Parse Error Function PHP – original code won't work??!

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Parse Error Function PHP – original code won't work??!

This topic is: not resolved

Tagged: functions.php, Parse Error, php

  • This topic has 4 replies, 2 voices, and was last updated 9 years, 3 months ago by SteveDub.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • October 24, 2013 at 9:59 am #68643
    SteveDub
    Member

    Hi all,

    I realise that this is a common question/issue and I have searched through previous posts but I haven't found an appropriate answer.

    I always make a backup copy of the original file just incase but this doesn't solve it either, this is why I am confused. Say I paste a code snippet in the wrong place, realise I have made this mistake and then either put it back exactly as it was before OR even replace the whole page with the original backup code, it then crashes the whole site and flags up a 'Parse Error' with a specific line number, which I have tried looking at but to no success, meaning I have to delete the whole database and start again!

    I can understand a simple mistake in the coding to cause this but how is this happening if I'm putting it back exactly as it was before??? it just doen't make any sense! :/

    Hope someone can shed some light on this, as atm I'm too scared to create too much content in the case of loosing all my hard work!

    Thanks,
    Steve

    October 24, 2013 at 12:17 pm #68668
    Summer
    Member

    How are you putting the code back? Have you tried using FTP to upload the backup copy back in place?


    WordPress / Genesis Site Design & Troubleshooting: A Touch of Summer | @SummerWebDesign
    Slice of SciFi | Writers, After Dark

    October 24, 2013 at 2:23 pm #68685
    SteveDub
    Member

    Hi Summer,

    Sorry I meant to state that in my original question but forgot to add! No I'm simply using the 'editor' interface within the wordpress dashboard, so if I've added or moved something wrong there, then I just either repaste or delete as appropriate, to get it back to it's original state. I can't see how this is flashing up an error, I'm sure I've done this in the past numerous times with no issues? I'm literally putting back in exactly the same way!

    Thanks for your help,
    Steve

    October 24, 2013 at 3:04 pm #68698
    Summer
    Member

    That's the problem. When you're using the WP editor to edit the functions.php, once you have an error in there, it will not refresh, cannot refresh, so technically, it thinks you still have the code with the error.

    If you go to your hosting control panel, and edit the file there, or use FTP and download the file, you'll see that it has not in fact been updated since that first time when you got the PHP error.

    So the WP editor is in fact faking you out 🙂

    It seems to still work for errors in other templates, just not functions.php


    WordPress / Genesis Site Design & Troubleshooting: A Touch of Summer | @SummerWebDesign
    Slice of SciFi | Writers, After Dark

    October 24, 2013 at 4:13 pm #68717
    SteveDub
    Member

    Ahhhh that now makes sense thank you so much.. I thought I was loosing the plot (well more than I already have :P)

    I will edit this outside of the dashboard from now on!

    Thanks for your help,
    Steve

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble