• I have been on the forum for 2 hours now.

    I have set up a ‘child theme’ – took a duplicate of Twenty Eleven in its entirety and put it in a renamed (new theme’s) folder. Changed the info on the .css file;

    Theme Name: PSA K9 2011
    Template:twentyeleven

    Next, I took my two custom sized (790 X 348) .jpg header files (with their thumbnails) and uploaded them to the child theme’s directory in the images/headers folder.

    Then I set out to figure how the PROPER way to do this.

    I found this thread and worked from the top of this thread to the bottom… trying all the suggested methods (of editing a blank child functions.php file) and I keep getting this…

    Fatal error: Call to undefined function twentyeleven_content_nav() in /home/aardvark/public_html/ratest3.com/wp-content/themes/PSAk92011/index.php on line 22

    If I restore the child theme’s function.php to exactly what is in the parent, the error goes away… but then I’m back to “how do I change the header size?”.

    Can someone point me in the direction to the actual correct way to change the header size (to something smaller in both height and width) in a twenty eleven child theme.

    Thank you. https://ratest3.com/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi AardvarkGirl, I created a child theme using an empty style.css and no functions.php or other files with this:

    /*
    Theme Name: PSA K9 2011
    Template: twentyeleven
    */

    In style.css

    If you have other files can you remove / save them to another directory and see about getting back to basics and if just that works for you please? We can always build up from there.

    Thread Starter AardvarkGirl

    (@aardvarkgirl)

    BTW – This is the thread I found (that I mentioned in my original post… that I forgot to paste). https://www.ads-software.com/support/topic/twenty-eleven-header-image-size?replies=26

    I’ve tried this (as the only thing in my) theme’s functions file https://pastebin.com/RSR8aC8f from this tutorial https://wpti.ps/functions/replace-remove-header-image-twenty-eleven-theme/ listed on the thread I mentioned above.

    and it is throwing this error

    Fatal error: Call to undefined function twentyeleven_content_nav() in /home/aardvark/public_html/ratest3.com/wp-content/themes/PSAk92011/index.php on line 22

    This is a fresh install with no plugins.

    Thread Starter AardvarkGirl

    (@aardvarkgirl)

    Came back to add I tried the following:

    Next I tried this (from the above listed thread from Ov3rfly’s post:

    General note: If you get an “unexpected T_FUNCTION” error with above posted code, use this instead:

    <?php
    
    // child theme functions.php
    
    function my_header_image_width($size) { return 1000; }
    add_filter('twentyeleven_header_image_width', 'my_header_image_width');
    function my_header_image_height($size) { return 100; }
    add_filter('twentyeleven_header_image_height', 'my_header_image_height');

    both with and without a closing ?> and getting the same exact error.

    Then I TOTALLY DELETED the functions.php file from the child theme folder, and still the same exact error.

    THEN I killed everything in the .css file except this

    /*
    
    Theme Name: PSA K9 2011
    Author: the WordPress team / Modified by Kaye Barnes for Roaring Aardvark
    Author URI: https://www.ads-software.com/
    Template: twentyeleven
    Version: 1.4
    License: GNU General Public License v2 or later
    License URI: https://www.gnu.org/licenses/gpl-2.0.html
    
    */
    
    @import url("../twentyeleven/style.css");

    And now I still have the same fatal error. :-\

    But I have noticed this error is only on the ‘home’ page.

    upload a clean version of an unedited Twenty Eleven parent theme.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Changing header size in twenty eleven child theme – getting 'Fatal Error'’ is closed to new replies.