How to install a child theme in WordPress.
July 27, 2011 3:07 PM
Two part WordPress question (child themes and Twenty Eleven template.)
1. How do I install a child theme? (specifically for the Twenty Eleven default template) (Where do I get one?)
I need to make some customizations to Twenty Eleven, specifically resizing the header and including a sidebar on single pages. From reading around it appears I should install a child theme 1st before customizing in order to ensure my changes are still there when the WP (theme?) is updated.
2. For the WP Twenty Eleven theme, the static Home page can be updated with as many posts as you want. (It is a setting.) How do I make it display so the 1st post is fully readable, and all the posts after that are just a summary that states 'read more' at the end?
Sorry for the lengthy details! Thank You in advance! And god help me trying to figure this out!
1. How do I install a child theme? (specifically for the Twenty Eleven default template) (Where do I get one?)
I need to make some customizations to Twenty Eleven, specifically resizing the header and including a sidebar on single pages. From reading around it appears I should install a child theme 1st before customizing in order to ensure my changes are still there when the WP (theme?) is updated.
2. For the WP Twenty Eleven theme, the static Home page can be updated with as many posts as you want. (It is a setting.) How do I make it display so the 1st post is fully readable, and all the posts after that are just a summary that states 'read more' at the end?
Sorry for the lengthy details! Thank You in advance! And god help me trying to figure this out!
This thread is closed to new comments.
2. You'd probably want to implement a new index.php file in your child theme with a different loop. I've done something like this before. Here's a code sample. Note that this is hard-coded to do one post in full + 5 excerpts. This would replace everything in the 2011 index.php file after <?php if ( have_posts() ) : ?> and before <?php else : ?>. Note that I've used some classes and IDs differently in my code, so you'd probably want to make appropriate changes.
posted by adamrice at 3:31 PM on July 27, 2011