Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

In WP 3.3, how can I extend the Twenty Eleven theme such that I can make some custom additions or modifications but still take benefit in the updates that WP pushes out for the theme? Sort of like 'overloading' in programming, I guess.

For now, I would like to include a custom css file and jQuery in header.php, and add a js function to single.php.

share|improve this question

2 Answers

You can do this by making a child theme. All the information about setting up a child theme can you find here: http://codex.wordpress.org/Child_Themes

share|improve this answer
So it's easy for the css but what for the js? – Ben Dec 25 '11 at 22:51
Just add js to your child theme. – BandonRandon Dec 26 '11 at 0:23
To clarify, yes you can do this. You can copy the single.php to your child theme and add the js functions in there. Or you can enqueue your script in your single template via a functions.php in your child theme (codex.wordpress.org/Function_Reference/wp_enqueue_script). Use if( is_single() ) { wp_enqueue_script( 'your-js', get_stylesheet_directory_uri() . '/js/your.js' ); } to add your js file. – Rob Vermeer Dec 26 '11 at 0:28

Create a child theme for Twenty Eleven

Or

Download Free Child Theme for Twenty Eleven Here

And Add your own custom CSS Using Firebug

share|improve this answer
Please disclose your affiliation when linking to own resources. Also lone link is considered a poor answer since it is meaningless by itself and target resource is not guaranteed to be alive in the future. Please try to include at least summary of information you are linking to. – Rarst Dec 27 '11 at 11:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.