Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1248086

    baywestchurch1
    Participant

    I was getting a parse error message at line 156 in my code. I contacted GoDaddy support, and they deactivated my /x/ folder, so I could get back to my WP-Admin area, but I don’t know how to get to the functions.php to remove the problem code.

    Any help?

    #1248087

    baywestchurch1
    Participant
    This reply has been marked as private.
    #1248215

    Rupok
    Member

    Hi there,

    Let’s upload a fresh copy of X. If you see any error, let us know with a screenshot of the error.

    Cheers!

    #1248679

    baywestchurch1
    Participant

    Will that destroy what I’ve already done and make me have to start over?

    #1248722

    Rahul
    Moderator

    Hey There,

    Thanks for writing back!

    Before doing so, we recommend you to take a backup of your entire site. You can follow below link for more information on taking a backup and restoring it to your WordPress :

    http://www.wpbeginner.com/wp-tutorials/how-to-restore-a-wordpress-site-with-just-database-backup/

    Hope this helps, let us know how this goes!

    #1248769

    baywestchurch1
    Participant

    Thanks! Will do.

    #1248806

    Prasant Rai
    Moderator

    You are most welcome. 🙂

    #1249074

    baywestchurch1
    Participant

    Okay…one problem. I have a Managed WordPress file at GoDaddy, so backups should be being made (in fact, it shows the last one on November 6th…which might be a problem, since that’s after the problem was created), but I haven’t made any personally…yes, I’m learning about what I should be doing.

    Honestly, under that, I’m not sure how to get to the PHP admin, because all that looks different than mine, and is it different because I have a managed WP site, and they are doing the backups at GoDaddy?

    #1249249

    baywestchurch1
    Participant

    Okay…I went ahead and uploaded a fresh install, and it keeps telling me that cornerstone isn’t validated and a couple of things like Enviro gallery isn’t validated and Solliloquy needs to be validated and it tells me to put in my code.

    when I go to “manage licenses” and copy the code to put in, it keeps telling me the code is not valid, but I’m highlighting and copying it right off the page in another tab on my browser…any help?

    #1249496

    Friech
    Moderator

    Hi There,

    Its either the x folder was not uploaded directly on the themes directory (/wp-content/themes/). Or you rename the x folder to something else.

    Actually it looks like you did not activate the X|Theme.

    The credentials you provided above does not work anymore, please provide us login credentials (WP-admin and FTP) in private reply so we can take a closer look.

    Back to your first issue, did you edit the parent x functions.php file? or the Child theme?

    If it is the parent x theme, you can simple overwrite that with new functions.php file from a fresh copy of x|theme.

    If it is the child theme you can just remove the function you added that cause the issue.

    Thanks.

    #1250592

    baywestchurch1
    Participant
    This reply has been marked as private.
    #1251067

    Rue Nel
    Moderator

    Hello There,

    Thanks for providing the details. I found out that you have added a custom code to the functions.php file. What you are trying to accomplish requires a template customization, we would like to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    After the child theme is set up, please add the following code in your child theme’s functions.php file

    //
    // Changing The Grid Messages "Sermon 4" to start by loading the second newest video.
    //
    function my_query_args($query_args, $the_grid_name) {
    
        if ($the_grid name == 'Sermon 4') {
            // all query parameters can be modified (https://codex.wordpress.org/Class_Reference/WP_Query)
            $query_args['offset'] = 1;
        }
        
        return $query_args;
        
    }
    
    add_filter('tg_wp_query_args', 'my_query_args', 10, 2);

    I have now renamed back the x folder to its original name. Please have the child theme installed and follow the instructions above. This should resolve the issue.

    Please let us know how it goes.

    #1252663

    baywestchurch1
    Participant

    I did exactly as you said and was editing my child theme (thanks for the resources).

    I copied the exact code above and placed it in my child theme’s functions.php file, saved it and got a white page with this error message.

    “Parse error: syntax error, unexpected ‘name’ (T_STRING) in /home/content/p3pnexwpnas15_data01/69/3653569/html/wp-content/themes/x-child/functions.php on line 31”

    lol…I can’t win.

    #1252901

    Lely
    Moderator

    Hello There,

    The issue is because of this line:
    if ($the_grid name == 'Sermon 4') {
    There should be underscore between $the_grid and name and not a space.
    Something like this:
    if ($the_grid_name == 'Sermon 4') {
    Please update it and it should work after that.

    Hope this helps.

    #1253400

    baywestchurch1
    Participant

    How can I get back to the page to update it? It won’t let me get to the dashboard…it throws the error and leaves me at the white page with only an error message.

    Thanks for all the help.