Help modifying Twentyeleven Widget HTML in functions.php
-
Hello,
I am trying to modify a Twentyeleven Child theme and need to change some html around the widget areas. I have successfully modified this in the functions.php file in the original Twentyeleven theme but I can’t figure out how to format the child functions.php file to ensure that my modification is not overwritten when the theme is upgraded.In the main Twenty Eleven functions.php file, I have added a div tag before the Main Sidebar and Showcase Sidebars on line 376 and 386:
[code moderated per forum rules – please use the pastebin]
My Child theme functions.php currently includes this modification to change the header image size:
[please mark any code (less than 10 lines) using the code button]
<?php // The height and width of your custom header. // Add a filter to twentyeleven_header_image_width and twentyeleven_header_image_height to change these values. define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyeleven_header_image_width', 1000 ) ); define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyeleven_header_image_height', 240 ) ); ?>The header image size works properly but I can’t figure out how to modify the sidebar widgets.
I would appreciate if if someone could post the correct code format that I need to insert into my child theme functions.php.
Thanks
Pete
The topic ‘Help modifying Twentyeleven Widget HTML in functions.php’ is closed to new replies.