• Resolved lyounk09

    (@lyounk09)


    I was adding some code to my functions.php and I got this fatal error and now I can’t log back into my site to try and fix anything even if I knew how to. Any help on how to fix this?

    Fatal error: Call to undefined function addaction() in /home/content/p3pnexwpnas06_data02/42/2407342/html/wp-content/themes/virtue_premium/functions.php on line 54

Viewing 15 replies - 16 through 30 (of 43 total)
  • Thread Starter lyounk09

    (@lyounk09)

    I have the filezilla but not sure how to go into the theme editor and fix what went wrong

    Thread Starter lyounk09

    (@lyounk09)

    I’m not able to connect to the server in filezilla now

    David_G

    (@questas_admin)

    Jeez I am sorry I couldn’t help you further today. Can’t believe that someone else didn’t pick up the slack. Anyway You don’t need to use Filezilla, what you can do is use the FILE MANAGER in your GoDaddy CPanel, you can download/upload the files this way. I suggest calling Godaddy support and have them help you with their file manager.
    Now I am assuming that you did in fact edit the functions.php file in your child theme, so based on that assumption, using FILE MANAGER go to your website, go to the following folder.

    /wp-content/themes/

    Once your in that folder look for your child theme, probably named something like VIRTUE-CHILD Go there. There probably is only 2 files, STYLE.CSS and FUNCTIONS.PHP, download the functions file (Save a spare copy) and open it in your editor on your computer, then remove the code you placed in their earlier. Be careful NOT to change anything else, save it and upload it back to your child-theme. IF the code you added is not there, then do the same thing with your functions.php file in the folder VIRTUE. Remember to make a backup copy of the functions.php file before you start editing.
    Now if all went well you should be able to get to your site. IF NOT, then using your FILE MANAGER rename the Theme folder to something like VIRTUE.BAK that will disable the theme and the site will go to a default theme and you can login.

    By the way, what is the URL to your site?

    I’ll be watching this thread for further developments. Good Luck.

    Thread Starter lyounk09

    (@lyounk09)

    questas_admin – thanks for the continued help. Here’s where I am on this (first off I know very little about any of this and should probably not be doing any thing with the code) but I’ll try and outline what I have/done. I started out with the Virtue theme (free version). After reading that it was a good idea to have a child version of your theme I did go into the FileZilla and create a child theme. I also added a style.css folder into the child theme – I didn’t add anything else. After I did this I upgraded to the premium version of Virtue (I probably should have done all that from the beginning but I’m learning). I then went into the child theme style.css and pointed it to Virtue-premium as someone suggested. From that point on I’m lost.
    I activated the Virtue Premium theme and made a few customizations after that. I’m not sure if I can in the child theme or not. What got me into trouble yesterday was I was trying to add a “continue shopping” button to my Woocommerce Cart. I found instructions online that said to add this snippet to the functions.php file within your theme folder:

    addaction( ‘woocommercebeforecarttable’, ‘wooaddcontinueshoppingbuttontocart’ );
    function wooaddcontinueshoppingbuttontocart() {
    $shoppageurl = getpermalink( woocommercegetpageid( ‘shop’ ) );
    echo ‘<div class=”woocommerce-message”>’;
    echo ‘ Continue Shopping → Need some more products?’;
    echo ‘</div>’;
    }

    I went to the editor on my dashboard found the functions.php file and added this code to the bottom. That’s when the error occurred – I’m not sure now what the error was but I went back and I thought I deleted this snippet. I must have deleted something else because that is when I got the fatal error.

    I am back into my site and I have activated my child theme. None of my premium theme info is there and I can’t activate the theme without causing the fatal error again. I can now get back into FileZilla but I’m not sure at this point what to do. Also I’m not sure if I am using the child them that related to my premium theme or not – not even sure that the child theme is set up correctly for the premium them. Thanks for any help.

    Since you have the premium version, you can (and should) ask the developer of Virtue for help here:

    http://www.kadencethemes.com/support-forums/

    Thread Starter lyounk09

    (@lyounk09)

    Here is the url to my site http://www.lindysdesigns.com

    I currently in filezilla and looking at the files – I don’t have a functions.php file in my child theme so the one I changed was under the theme folder. I downloaded a copy of that file to my site (along with a copy). I have located what I think is the wording that I added (at least it matches what I found on that other site). If I delete that information and download it back to the remote site folder should that fix the fatal error issue?

    Once I do that I still have an issue with the child theme versus the premium theme that I downloaded. The child theme does not have all of the functions that are in the premium theme? Should it? Also should there be a functions.php folder in my child theme directory?

    David_G

    (@questas_admin)

    First lets deal with your functions. If you have the zipped copy of the theme, unzip it and get the functions.php file. Upload that to the site into the theme folder, that will fix any errors.

    To answer your question regarding child theme, no you do not lose any of the functions of the parent theme, it allows you to customize the theme without changing any of the theme files.

    The best way to make changes like this to a theme is to use a child theme, so your tweaks won’t be overwritten when updating the theme. Here are some guides in case you haven’t made one before:

    https://codex.wordpress.org/Child_Themes
    http://op111.net/53/

    Also should there be a functions.php folder in my child theme directory?

    Yes, but it should not be a copy of the parent functions.php file. See the link above about Child Themes.

    And ask on the Premium support forums!

    David_G

    (@questas_admin)

    I see your site is up, Fantastic. And it looks like your childtheme is active.

    Thread Starter lyounk09

    (@lyounk09)

    Ok – here’s where I am at this point. I made a copy of the functions.php file from my remote site and copied it to my local site. I opened it in a text editing and deleted the code that I added yesterday. I then uploaded that back to my remote site. I have not reactivated the premium theme on my site for fear that it will break again.

    I have a child theme set up and a style.css folder in the child directory:

    Here is what I have in the style.css sheet

    /*
    Theme Name: Virtue Child Theme
    Theme URI: http://themes.kadencethemes.com/virtue/
    Description: Child Theme for Virtue
    Author: Kadence Themes
    Author URI: http://kadencethemes.com/
    Template: virtue_premium
    Version: 1.0
    */
    @import url(‘../virtue_premium/style.css’);

    Please HELP…

    MY site is down.I can not access WordPress account, my site showing

    Warning: require(/home/.sites/612/site2086/web/wp-includes/load.php): failed to open stream: No such file or directory in /home/.sites/612/site2086/web/wp-settings.php on line 21

    Fatal error: require(): Failed opening required ‘/home/.sites/612/site2086/web/wp-includes/load.php’ (include_path=’.:/usr/share/pear’) in /home/.sites/612/site2086/web/wp-settings.php on line 21

    I can access through FTP.

    David_G

    (@questas_admin)

    Good, your site is up and running, looks like it is running on the child theme, which means it is using the parent theme, you dont need to activate the parent theme as it is active under the child theme. Take a look at the links in my previous post, they explain more about how a child theme works and how to use it. You should have a functions.php file in the child theme and that would be where you would place your woocommerce code. Then if you make a mistake, all you need to do is fix that file which will only have YOUR customizations in it. Watch the video and visit the sites, a little reading will go a long way to understanding how your site works.

    David_G

    (@questas_admin)

    @sam_chowdhury12 you need to start a new thread for your issue.

    ok sorry

    David_G

    (@questas_admin)

    @lyounk09

    When it comes to custom styling your site, take a look at this. It is a very useful tool which works in mozilla.

    http://getfirebug.com

Viewing 15 replies - 16 through 30 (of 43 total)

The topic ‘Fatal Error’ is closed to new replies.