• Resolved zjay2017

    (@zjay2017)


    Hello Colormag community,

    I’m currently facing an issue with modifying the colormag_date_meta_markup function in my child theme. My goal is to display the last updated time on every post if it has been modified, but I’m encountering an error when attempting to make the necessary changes.

    Here’s a brief overview of the problem:

    • I’ve created a child theme named colormag-child to preserve modifications during parent theme updates.
    • I’ve copied the colormag_date_meta_markup function to my child theme’s functions.php file.
    • When I try to modify the function in the child theme, I receive the following error: “Your PHP code changes were not applied due to an error on line 800 of file wp-content/themes/colormag/inc/template-tags.php. Please fix and try saving again. Cannot redeclare colormag_date_meta_markup() (previously declared in wp-content/themes/colormag-child/functions.php:21)”.

    I’ve researched online and attempted various solutions, but none have worked so far. Could someone please provide guidance on how to properly modify the colormag_date_meta_markup function in a child theme without encountering this error?

    Any help or suggestions would be greatly appreciated. Thank you in advance!

  • The topic ‘Error Modifying colormag_date_meta_markup Function in Child Theme’ is closed to new replies.