• so i installed the plugin code snippets and i tried adding this function;
    function fullframe_child_theme_setup() {
    // Used for Featured Content, Featured Grid Content and Archive/blog Featured Image
    add_image_size( ‘fullframe-featured-content’, 400, 225, true); // used in Featured Content Options Ratio 16:9
    }
    add_action( ‘after_setup_theme’, ‘fullframe_child_theme_setup’, 11 );

    when i activated the code it gave me this fatal error and now i cant get to my dashboard.

    Fatal error: Cannot redeclare fullframe_child_theme_setup() (previously declared in /home/calclaua/public_html/wp-content/plugins/functions.php:15) in /home/calclaua/public_html/wp-content/plugins/code-snippets/includes/snippet-ops.php(446) : eval()’d code on line 4

Viewing 1 replies (of 1 total)
  • This error is happening because there are two functions in your site with the same name. One is added through code snippets, from the error message the other seems to be in the file at /home/calclaua/public_html/wp-content/plugins/functions.php.

    You’ll need access to your site files either through a file browser in your hosting control panel, or FTP. Deleting the fullframe_child_theme_setup() function from that functions.php file (or if there’s nothing else in there, deleting the file completely) should solve the issue. Remember to take a backup of the file before making any changes, just in case, as without knowing the purpose of the file I can’t say what else may be in there and how important it is.

Viewing 1 replies (of 1 total)

The topic ‘Fatal error, trying to add function to function .php using code snippet’ is closed to new replies.