The error message is pretty clear in this case.
You can’t have two functions with the same name.
WordPress already has function called get_header_image
, so you can’t call your custom function with this name.
That’s why it’s a good idea to add prefixes to functions you declare in your theme. So instead get_header_image
you call your custom function MYTHEME_get_header_image
(of course replace MYTHEME
with name of your theme).
Related Posts:
- How to fix empty dashboard issue in WordPress?
- Fatal error: Call to undefined function wp() in ../wp-blog-header.php?
- Call to undefined function nocache_headers() [closed]
- The famous WordPress white screen of death
- How do I “fix” a wp-blog-header.php error message?
- Blank/White Screen on Frontend but Accessible backend?
- PHP Fatal error: Cannot call overloaded function for non-object in wp-includes/capabilities.php [closed]
- current_user_can on WordPress 3.1.1
- WordPress White Page with Certain Database
- Memory issues – Fatal error: out of memory – plugins?
- PHP Fatal error: Call to undefined function WP_Filesystem() [closed]
- What does this mean: Object of class WP_Error could not be converted to string
- How to customize the critical error message?
- 500 Error only one one page in the WP admin
- How to make my plugin code die gracefully
- Fatal error…Please help me
- Fatal error after updating to WordPress 5
- Revslider error. Impossible to enter admin dashboard [closed]
- Fatal error after update [closed]
- White screen of death after an auto update of WordPress
- Fatal Error after migrating WordPress site from one host to another
- WordPress problem with fatal error
- After Plugin deinstallation, Login impossible and line50 error
- Need help decrypting error and warning messages
- WordPress crashed during update
- locked out of wordpress site ‘warning: require once’
- Can’t access my site due to fatal error [closed]
- White screen after a couple hours?
- My site is not working because of this: Fatal error: Cannot redeclare be_themes_contact_authentication [closed]
- Fatal error: Uncaught Error: Call to undefined function do_action_ref_array() when using wp_signon function
- Allowed memory size exhausted
- Fatal error: Call to undefined function the_archive_title ()
- Fatal error: Call to undefined function reset_mbstring_encoding
- WP_Error with get_category_parents
- Fatal Error Class ‘WP_Widget_Pages’ not found in /home/****/public_html/wp-includes/class-wp-widget-factory.php
- Fatal error in wordpress htdocs
- failed to open stream – wp-includes/blocks/file.php
- WordPress critical error (tried plugin + debug!)
- Not able to access admin console after Installing and activating a plugin
- Fatal error: Uncaught Error: Class ‘WP_REST_Meta_Fields’ not found in
- Uncaught Stripe\Exception\SignatureVerificationException: Unable to extract timestamp and signatures from header
- unable to edit any page of my wordpress website
- How to remove theme that caused WordPress to crash?
- Fatal error: Uncaught Error: Call to undefined function twentynineteen_post_thumbnail()
- Php Fatal error. Blank wordpress admin panel
- Recoverable fatal error: Object of class WP_Error could not be converted to string in /home/xyz/mysite.com/wp-includes/formatting.php on line 3796
- How to fix wordpress white screen of death a cause bad php code?
- Catchable fatal error: Object of class WP_Error could not be converted to string in
- WordPress site suddenly stopped working
- wp search-replace inside site’s directory bring PHP fatal error
- WordPress Fatal Error
- Blank page and 301 redirect
- White Screen of Death error
- WordPress displays 500 error on PHP errors
- WSOD on 4.1.1 after migrating from Bluehost to Dreamhost
- Object of class WP_Post could not be converted to string
- Fatal error: Call to undefined function term_exists()
- Call to undefined function is_blog_installed(), after creating functions.php [closed]
- Parse error: syntax error, unexpected T_FUNCTION on plugins page
- Blank screen at login/logout – tried everything!
- Fatal error: Can’t use method return value in write context
- Fatal error: Call to undefined function request_filesystem_credentials()
- Fatal error: Allowed memory size of 94371840 bytes exhausted (tried to allocate 42240 bytes) in /home/dh_w7t9sk/morleywines.com/wp-content/plugins/
- HELP! Fatal Error? I can’t access the Dashboard. How do I regain access? [closed]
- Flamingo’s Fatal error: Allowed memory size of 134217728 … wp-includes/wp-db.php on line 2516 [closed]
- Fatal error: Uncaught Error: Call to undefined function wpcf7
- How to fix Fatal Error in wp-includes/meta.php after upgrade to PHP 8
- Call to undefined function create_function()
- Fatal error: Uncaught Error: Call to undefined method Elementor\Utils::is_ajax() [closed]
- “CRITICAL Object of class WP_Error could not be converted to string” using templates with twig
- WordPress core files – PHP Warning: file_exists(): open_basedir restriction in effect
- PHP Notice: Undefined offset: 1 with array when reading data
- Weird PHP error: ‘Can’t use function return value in write context’
- A fatal error has been detected by the Java Runtime Environment. EXCEPTION_ACCESS_VIOLATION
- White screen of death only in wp-admin
- Does wordpress have an error log?
- Where all are child themes recorded when they are created in WordPress
- wp_ob_end_flush_all and wp_suspend_cache_addition()
- Why “Call to a member function on a non-object” in plugin only?
- White screen of death on admin and other dashboard pages
- Upgrade to 3.4 error: Call to undefined function get_option()
- Fatal Errors on pluggable.php
- Using $this from child class inside shortcode function
- Can’t access site after plugin activation
- How to prevent PHP fatal error if plugin hasn’t been enabled and a method is called in theme file?
- Fatal error: Cannot redeclare admin_notice() [closed]
- Fatal errors to undefined function in theme 404.php file [closed]
- wordpress admin part is not accesbile after server shifting
- Bug in wp_insert_post script and form, probably something simple I am not seeing
- signup_user() throws fatal error
- Fatal error: Uncaught Error: Class ‘WP_Widget’ not found
- WP_Fatal_Error_Handler OR WP_Error OR try/catch
- Fatal error: Class ‘RDTheme’ not found
- WordPress error on my website
- Blank sign in page
- WP white screen of death after duping a site that works fine on same server
- After being hacked Fatal error: Call to undefined function get_header() in 404.php on line 1
- Front-end major break after upgrade PHP 8.0 [closed]
- Fatal error trace not shown in development setup
- WP Elementor Pro causing crtical failure on website