• Hi,

    I’m having problems removing functions from a .php file from the parent theme. For example I want to remove the footer. The code in the file is

    function thinkup_input_copyright() {
    
    global $thinkup_footer_copyright;
    
    	printf( __( 'Developed by %1$s. Powered by %2$s.', 'lan-thinkupthemes' ) , '<a href="//www.thinkupthemes.com/" target="_blank">Think Up Themes Ltd</a>', '<a href="//www.wordpress.org/" target="_blank">Wordpress</a>'); 
    
    }

    I have tried a lot of things but nothing has worked yet. I have the same file name and same folder structure etc..

    In another file, I want to overwrite a function but I don’t know how to. I tried to copy the parent php file to my child theme and changed the things I wanted to change but then I got this error:

    Fatal error: Cannot redeclare...

    Thank you for your help!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Instead of changing the function, try changing the theme’s footer.php template file. In your child theme’s footer.php, you can remove the call to the function.

    what theme are you using?

    Thread Starter raggie

    (@raggie)

    Thanks aestheticdesign, that worked for the footer part. Still having problem doing pretty much the same thing for the featured areas in my theme, in the header.php i found the following code:

    <?php thinkup_input_homepagesection(); ?>

    I tried to change it to e.g. thinkup_input_homepagesection1 and also change it in the other php file where the code is:

    function thinkup_input_homepagesection() {

    But I get “Fatal error: Call to undefined function thinkup_input_homepagesection1()” so obviously this is not the right way to do it?

    alchymyth, I am using the minamaze theme.

    as any solutions to your question will be very theme specific, please try posting your question in the theme’s forum at https://wordpress.org/support/theme/minamaze/ to possibly attract the theme’s author’s attention.

    Thread Starter raggie

    (@raggie)

    alright! Thank you

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

The topic ‘Remove functions from child theme’ is closed to new replies.