• Resolved LesserNoddy

    (@lessernoddy)


    Hello
    I am using attitude theme for which i created a child theme,
    everything is working fine but when i copy the function.php to my child theme folder,a fatal error shown to my website instead of showing website,it will show me this error

    Fatal error: Cannot redeclare attitude_constants() (previously declared in /home/domain/public_html/wp-content/themes/child/functions.php:30) in /home/domain/public_html/wp-content/themes/attitude/functions.php on line 65

    plz help

    thanks
    in advancaed

Viewing 3 replies - 1 through 3 (of 3 total)
  • copy the function.php to my child theme folder,

    Yes, that’s generally what happens. You can’t copy that file to a child theme – see:

    http://codex.wordpress.org/Child_Themes#Using_functions.php

    Thread Starter LesserNoddy

    (@lessernoddy)

    Thanks
    i do the same ,create blank function.phpin child theme and add a followin code `<?php

    // Remove old copyright text
    add_action( 'init' , 'mh_remove_copy' , 15 );
    function mh_remove_copy() {
            remove_action( 'attitude_footer', 'attitude_footer_info', 30 );
    }
    
    // Add my own copyright text
    add_action( 'attitude_footer' , 'mh_footer_info' , 30 );
    function mh_footer_info() {
       $output = '<div class="copyright">'.'Copyright © [the-year] [site-link] Powered by: SUPER MARTIANS FROM MARS! '.'</div><!-- .copyright -->';
       echo do_shortcode( $output );
    }
    ?>

    to remove credit from the theme ,iam using attitude theme and follow the below post.

    http://wordpress.org/support/topic/remove-or-edit-info-in-footer?replies=28

    but this will change nothing or doesnot work.

    thanks

    Thread Starter LesserNoddy

    (@lessernoddy)

    sorry

    Nevermind, I hadn’t “activated” the child theme
    now its work properly.
    thanks

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘function.php create Fatal error: Cannot redeclare attitude_constants()’ is closed to new replies.