How to add a sidebar to the article page of the Twenty Eleven theme?

How to add a sidebar to the article page of the Twenty Eleven theme?

The Twenty Eleven theme is beautiful and highly customizable, but the lack of a sidebar on the article pages is a bit annoying. Here's how to add a sidebar.
1. Find the following code in the single.php file:

<?php get_footer(); ?>

Add on it

<?php get_sidebar(); ?>

The method of adding to other pages is the same as above.
2. Delete the following code in the functions.php file:

function twentyeleven_body_classes( $classes ) {
if ( ! is_multi_author() ) {
$classes[] = 'single-author';
}
if ( is_singular() &amp;&amp; ! is_home() &amp;&amp; ! is_page_template( 'showcase.php' ) &amp;&amp; ! is_page_template( 'sidebar-page.php' ) )
$classes[] = 'singular';
return $classes;
}
add_filter( 'body_class', 'twentyeleven_body_classes' );

That's it.

<<:  Cirrushosting.com Web Hosting 50% Discount Code

>>:  Free .TK top-level domain application tutorial

Recommend

Datarealm: $4/month/512MB/15GB space/1TB traffic/KVM/Phoenix

Datarealm was founded in 1995, and it has been 20...

ImbaHost: $4/month/1GB memory/20GB SSD/1TB traffic/1 IP/KVM/Dallas

ImbaHost is an American hosting company, founded ...

[Black Friday] BudgetNode: KVM VPS with 1GB RAM and 1TB storage for $60 per year

BudgetNode, an American hosting provider, is a fo...

Host2ez is open again

The price is very tempting. Check it out: http://...