• Resolved Steve Keller

    (@stevekeller)


    Hi,

    I went to the Custom Code section of the parent theme (Genesis), and changed one line, and now the whole site is affected, and I am getting this error message…

    Parse error: syntax error, unexpected ‘/’ in /homepages/39/d353228821/htdocs/eqwp/wp-content/uploads/prose/custom.php on line 10

    Here is the line after I changed the name of the designer…

    Marketing By (Web)Design

    I just replaced the previous designer’s line with mine. The first Parse error message said the problem was on line 10, and now I am all freaked that I have completely messed the site up. I tried to reverse my mistake, by modifying a different line(echo date(‘Y’);
    echo ‘Marketing By (Web)Design·
    echo ‘</p></div>’;)
    , and I got this…

    Parse error: syntax error, unexpected ‘href’ (T_STRING), expecting ‘,’ or ‘;’ in /homepages/39/d353228821/htdocs/eqwp/wp-content/uploads/prose/custom.php on line 10

    I would really appreciate any help I can get from this forum, though I have not had great luck resolving other problems here.

    Fingers crossed!

    Steve

    ps -here is the whole CSS Custom Functions bit of code…

    <?php
    /** Do not remove this line. Edit functions below. */
    /** Customize the credits */
    add_filter(‘genesis_footer_creds_text’, ‘custom_footer_creds_text’);
    function custom_footer_creds_text() {
    echo ‘<div class=”creds”><p>’;
    echo ‘Copyright © ‘;
    echo date(‘Y’);
    echo ‘Marketing By (Web)Design·
    echo ‘</p></div>’;
    /** Customize the entire footer */
    remove_action( ‘genesis_footer’, ‘genesis_do_footer’ );
    add_action( ‘genesis_footer’, ‘child_do_footer’ );
    function child_do_footer() {
    ?>
    <p>© Copyright 2014 Equinox Acupuncture & Massage · All Rights Reserved</p>
    <?php
    }

    /** Remove Header */
    remove_action( ‘genesis_header’, ‘genesis_do_header’ );
    }

Viewing 15 replies - 1 through 15 (of 17 total)
  • FTP into your site and rename your theme. This will cause WordPress to select the default theme. You will then be able to login and reinstall your theme.

    Thread Starter Steve Keller

    (@stevekeller)

    I have never used the FTP function, and I assume that I could find that on the hosting company’s site?? Why do I have to reinstall, if I got the CSS back from the Reset deletion?

    I will check out the FTP route, but I hope someone has an easier recommendation.

    Thanks,

    Steve

    Can you post your entire custom.php to pastebin and post the link here? Your code got mangled by the forum’s parser.

    Thread Starter Steve Keller

    (@stevekeller)

    Cool…thanks for the education re pastebin!

    https://pastebin.com/5rFrdwjG

    Thanks so much!

    Steve

    Looks like you’re missing a ' in line 11. Should be:

    echo ' &middot';

    Hey Steve,

    Sorry to hear you’re having trouble; I think we’ve all had the experience of a broken template file locking down our entire sites.

    Firstly, in addition to what stephen said (if it doesn’t fix), try removing the ( and ) from around Web. It’s not a part of the php code as it is something you want printed/echoed and I have a feeling php might be trying to parse it as code when it should be outputting as is.

    Secondly, and unfortunately, because of the nature of the ‘breaking’ of the template file (in the php itself which throws up the php error), it IS entirely likely that you will need to 1) delete the ‘bad’ file and 2) reupload the ‘good’ file to ‘unlock’ your install and site.

    One of WordPress’ quirks:

    Let’s say you accidentally forgot a semicolon somewhere in your functions.php and you save the file and load and – whoops! Error! Clicking back, you go, “Oh hey, I know I can fix this!” and you fix it and save again…

    Will the file save and your theme and Admin panel restore itself?

    Nope.

    If you have a broken file in your theme and WordPress throws up the error and ‘locks’ you out, the only way to UNlock it (that I personally know of) is to use FTP to delete that bad file and reupload a good file.

    Let us know how things go!

    Thread Starter Steve Keller

    (@stevekeller)

    EMG and Steve,

    Thanks for the great info! I am having difficulty with the Hosting company, but when I get to the FTP file, what am I going to do? Should I copy the Custom CSS and the bulk of the Custom Functions section, and put it wherever it seems right?? I just anticipate totally screwing the site, but it’s pretty much screwed right now (though I haven’t tried your other recs). Just put in Steve’s rec and got this…

      “Parse error: syntax error, unexpected ‘href’ (T_STRING), expecting ‘,’ or ‘;’ in /homepages/39/d353228821/htdocs/eqwp/wp-content/uploads/prose/custom.php on line 10,

    but cannot make sense of yours, re removing “( and )” from the word “web”, because I can’t find “(web)” in either CSS section. Steve’s rec yielded the same error/parse message.

    I really appreciate the coding expertise you all have and that I aspire to, so any recs on where I should be reading/learning, in addition to helping me get this site back online, will be greatly appreciated!

    Best,

    Steve Keller

    How were you editing the file before? You could continue to edit the file that way if it’s still possible. Alternatively, if you have a copy of the file on your computer, you can upload it to your server via FTP.

    Looks like you and I both missed a closing bracket in your custom_footer_creds_text() function. The entire function should be:

    add_filter('genesis_footer_creds_text', 'custom_footer_creds_text');
    function custom_footer_creds_text() {
        echo '<div class="creds"><p>';
        echo 'Copyright &copy; ';
        echo date('Y');
        echo ' &middot';
        echo '<a href="https://marketingbywebdesign.wordpress.com/">Marketing By (Web)Design</a></p></div>';
    }
    Thread Starter Steve Keller

    (@stevekeller)

    Hey Stephen,
    I was brought on to maintain/manage the site about 3 months ago, and I am more of a wordpress.com sort of guy, though I am working on 2 wp.org sites. Thus, editing was all within the WP editor functions. If you look at my earlier posts, you’ll see the first major issue I had with this Equinox site…a disappearing sidebar that I couldn’t fix. I really don’t know jack about this parent/child theme business, but I get the concept…just don’t know how to do anything productive on the site.

    Can’t even pull up the site, due to this php meltdown, so there is no editing necessary. I do have an XML file from a few months ago…only minor changes since then. Just tried to get to the site dashboard, and am not able to, due to this php issue…got this, when I tried any avenue to get to the wordpress end…
    Parse error: syntax error, unexpected ‘href’ (T_STRING), expecting ‘,’ or ‘;’ in /homepages/39/d353228821/htdocs/eqwp/wp-content/uploads/prose/custom.php on line 10

    So, since I cannot get to the CSS screen, I guess I have to do the FTP route, though I have little idea how. Should I just call the hosting company and see if they can lead me through the FTP reinstall?

    Thanks,

    Steve

    Usually the hosting company has a utility on their control panel to create an ftp account. If they do you just have to start the utility and setup an ftp account. The utility usually requires you to select a folder where you want to upload to and a user name and password.

    After you have an account setup you need to download an ftp client. There are a large number of ftp clients like FileZilla. Once you have the client you need to configure it with the uri of your site ( ftp.yoursite.com) and enter the username and password you created.

    If you are successful and connect to your server you will be able to transfer files and work on them though the ftp client.

    Thread Starter Steve Keller

    (@stevekeller)

    EMG,
    If you are still around, sorry for my lamebrain interpretation of your post yesterday…misread the “( and )” and saying I couldn’t find “(web)”, when it’s in my business name…bug duh, huh?!

    Back to Steve’s rec…I have talked with the hosting company and got into the backend…/eqwp/wp-content/uploads/prose/custom.php, which reads…

    1 <?php
    2 /** Do not remove this line. Edit functions below. */
    3 /** Customize the credits */
    4 add_filter(‘genesis_footer_creds_text’, ‘custom_footer_creds_text’);
    5 function custom_footer_creds_text() {
    6 echo ‘<div class=”creds”><p>’;
    7 echo ‘Copyright © ‘;
    8 echo date(‘Y’);
    9 echo ‘·
    10 echo ‘Marketing By (Web)Design</p></div>’;
    11 /** Customize the entire footer */
    12 remove_action( ‘genesis_footer’, ‘genesis_do_footer’ );
    13 add_action( ‘genesis_footer’, ‘child_do_footer’ );
    14 function child_do_footer() {
    15 ?>
    16 <p>© Copyright 2014 Equinox Acupuncture & Massage · All Rights Reserved</p>
    17 <?php
    18 }
    19
    20 /** Remove Header */
    21 remove_action( ‘genesis_header’, ‘genesis_do_header’ );
    22 }

    Can I go in there, remove the ( ) from the word “web”,save and then all will be back to normal? Didn’t sound like that was likely, per EMG.

    Thanks again, and again!!

    Steve

    Thread Starter Steve Keller

    (@stevekeller)

    Tom,

    I didn’t see your post before I sent my last. Good explanation! Will try that, but I seem to have issues with Filezilla not liking my old Powerbook G4, which runs OSX 10.5.8.

    It seems I was able to change the custom.php file to remove the ( ), but had to change the name of the new custom.php.html file to CSS.php, and move the old one to another folder. This left the Prose folder with four folders: custom.css, custom.php, minified.css, and settings.css.

    How do I determine if that helped, or is there no chance it did?

    Thanks,

    Steve

    @emg: Are you the creator of the Genesis framework?

    @steve Keller: I’m a bit confused by some of the things in this thread. In your topic title you said you changed the CSS, but then you kept posting PHP code. Why is there a PHP file within a directory containing CSS files?

    I suggest at this point you try to contact the creators of the Genesis framework. They would know more about the file structure of their framework.

    Thread Starter Steve Keller

    (@stevekeller)

    Stephen,

    For good measure, and because I hadn’t done it when you recommended, I added an apostrophe after middot. Just put it on pastebin, at https://pastebin.com/Bmg73dpM.

    Thanks,
    Steve

    Thread Starter Steve Keller

    (@stevekeller)

    Stephen,

    I guess my wording was inexact…the line that I changed was on the php section of the … well, something I did worked, because the site is back up and running. Thanks to you guys! I did set up a Filezilla FTP account, so now I have to figure out how to use it!

    Thanks very much for bearing with me, and for your help resolving this issue! I won’t note that it is resolved until later today, just to be safe.

    Best,

    Steve

    ps-I hope I get such great help in the future!!

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Bad move, I fear! Changed one line of CSS, and then reset and the site is shot!’ is closed to new replies.