WordPress.org

Ready to get started?Download WordPress

Forums

Child theme issue (I think) (3 posts)

  1. alsc
    Member
    Posted 3 years ago #

    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.

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    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.

  3. alsc
    Member
    Posted 3 years ago #

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

    The admin screens will need more scrutiny :)

Topic Closed

This topic has been closed to new replies.

About this Topic