Support » Fixing WordPress » Site Won't Work

  • Resolved justin1990

    (@justin1990)


    Hi,

    I have genesis theme and I was trying to remove the word “private” from a private post. I went on the studiopress forum and someone gave me this code to try in my functions php folder:

    <?php

    function remove_private_prefix($title) {
    $title = str_replace( ‘Private:’, ”, $title);
    return $title;
    }
    add_filter(‘the_title’,’remove_private_prefix’);

    I tried this code and it didn’t work. I deleted it and tried to put my code back to the way it was but instead got this message when I updated it:

    Parse error: syntax error, unexpected ‘<‘ in /home/content/29/11519829/html/wp-content/themes/metric/functions.php on line 58

    Now I can’t even log into my wp-admin panel or my site and all I get when I try to do either is that same message!!

    Can anyone help me get my site back?? Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • You need to access your website files using either FTP or your website management file manager.

    Revert to the default twentyfourteen theme by renaming the directory of your genesis theme in “wp-content/themes”

    OR if you can, replace the file “functions.php” with an original for genesis.

    As for your original problem of a post being PRIVATE, why not access the quick edit option for this post from Dashboard > Posts. You can edit the title, and also change the status.

    Thread Starter justin1990

    (@justin1990)

    Hey Ross thanks,

    Would this reset all of my customizations to my site that I’ve done on Genesis so far and would I lose any of my work so far?

    Thread Starter justin1990

    (@justin1990)

    I can’t do the latter I think because I can’t login to my wp-admin either. Unless you can access that functions.php file in Godaddy? Do you know if you can?

    Re your customisations, they should be retained, a design change a few versions back was that options got saved in the context of the theme, so when the theme is reactivated, the settings are restored, that is the theory. Still take a backup of your database, which you should be doing.

    You need to use either FTP or your website manager file manager. This will let you upload and replace files.
    Your website manager will also let you backup your database.

    Again, if you don’t have FTP setup then use your cPanel login.

    Thread Starter justin1990

    (@justin1990)

    Just fixed it.

    I had Genesis support help me out. For anyone needing this in the future I will post what they told me to do and what I did. They said:

    “You will need to access your site via your web hosting account.

    You can do this either via FTP (filezilla) or the File Manager area in your web hosts CPanel. If you are not sure of how to do this I recommend asking your web host for instructions on how to do either.

    Once connected, go to ‘wp-content/themes/metric/functions.php’ and copy the code that you see in this file for us to look at.

    You can also replace the file content with the code from a fresh copy of the theme file if you want to.

    I hope that helps.”

    So I looked up this file in the file manager area in GoDaddy and just deleted the bad code and put the original code back in.

    I didn’t have to even have them look at it because I knew it was the last 4 lines that I added. And voila, it worked! My site’s back up!! 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Site Won't Work’ is closed to new replies.