WordPress.org

Support

Support » Plugins and Hacks » Hacks » Child theme issue (I think)

Child theme issue (I think)

  • I’m using the Twentyten theme and a child theme at http://swingshoes.swingouts.dk.

    I have two questions:

    First, I’m trying to change the header image height in the child theme but it always comes out wrong, so I changed the functions.php of the parent theme as a short term solution.

    // The height and width of your custom header. You can hook into the theme’s own filters to change these values.
    // Add a filter to twentyten_header_image_width and twentyten_header_image_height to change these values.
    define( ‘HEADER_IMAGE_WIDTH’, apply_filters( ‘twentyten_header_image_width’, 940 ) );
    define( ‘HEADER_IMAGE_HEIGHT’, apply_filters( ‘twentyten_header_image_height’, 150 ) );

    Second, how do I add a menu item to the control panel item tools or setup? One plugin (form builder) doesn’t have a short cut so I have to go to the plugin page and find the plugin to manage it.

    I want to set up a menu item that links to the Form Builder manage page.

    Hope, someone can help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • esmi
    Forum Moderator

    @esmi

    To change the header height in a child theme, add:

    // Decrease header image height to 100px
    function my_header_height($height) {
    	$height = 100;
    	return $height;
    }
    add_filter( 'twentyten_header_image_height', 'my_header_height' );

    to the child’s functions.php file. If you want to add a menu item to the admin screens you need to start looking at the Settings API.

    Esmi: Thank you for the header height answer. It worked great.

    The admin screens will need more scrutiny 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Child theme issue (I think)’ is closed to new replies.