zerpex
Member
Posted 11 months ago #
Hello guys and girls!
I'm sitting here with my Site, and want the frontpage to be one-column, I go to Theme Options, set default Template to One-Column, go to all my other pages, and set the Template to Sidebar Template.. When I then view the other pages, They doesn't have a sidebar for some reason.
Do anybody know how to fix it?
Best regards,
Lucas
Do not edit the Twenty Eleven theme. It is the default WordPress 3.2 theme and having access to an unedited version of the theme is vital when dealing with a range of site issues.
For this reason, it is recommended that you consider creating a child theme for your customisations. Once your child theme is active, we should be able to help with the customisation.
zerpex
Member
Posted 11 months ago #
Seems like it's a standard post Esmi..
So I'm wondering, the Twenty Eleven Theme in wordpress is for no use? - We can't even use it as a blog? Is it just installed for taking space.. Because seems like we may not use it for our website.. Even without changing the theme code..
Please try reading my previous post.
zerpex
Member
Posted 11 months ago #
I can say so much, that I'm running a Child version of Twenty Eleven - And the problem is that the sitebar template ain't working if I have one-column as default layout.. Then I can't set sidebar template for other sites ;)
bartsurminski
Member
Posted 11 months ago #
I've created a workaround by editting 2 files (or 3 if you want the sidebar on single-post sites as wel.
Check out: http://surminski.eu/2011/07/06/add-sidebar-to-single-post-in-the-wordpress-3-2-twentyeleven-theme/
Pls comment on my post if you have any questions/remarks.
zerpex
Member
Posted 11 months ago #
Hello Bartsurminski!
That I have, is I'm having 5 pages, Like etc Home, About Us, and Contact - I want the Home to be a onecolumn page, with no sidebar, and the others should have a Sidebar, but when I set onecolumn-page as default in the admin panel, it aint working with the sidebars on the other pages. - I'll take a look on your site!
bartsurminski
Member
Posted 11 months ago #
You might be able to remove the get_sidebar statement from index.php in the editor.
Open index.php in the editor (under appearance)
Change
</div><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
In:
</div><!-- #primary -->
<?php get_footer(); ?>
Then click 'update file'
I haven't checked it myself if it works, so please backup your index.php.
Hope it helps
zerpex
Member
Posted 11 months ago #
At least it removed the sidebar - Do you know any way, when you inspect the body tag, it says two-column - if I change that class to one-column, it works as it should - But I can't find anywhere, where it writes two-column to the body tag for the frontpage
Niraj Chauhan
Member
Posted 10 months ago #
The easiest way to get the sidebar on single.php or post page is to install a Child Theme of 2011 theme,
You can download the theme from here
http://webstutorial.com/add-sidebar-twentyeleven-theme/content-management-system-cms
rohitink
Member
Posted 10 months ago #
You Can Do these changes without using any child theme. Here is What You have to Do.
Add Sidebar TO Single Post Pages in Twenty Eleven
zerpex
Member
Posted 10 months ago #
Thank you both, I got everything fixed now.. :)
abdumayet
Member
Posted 10 months ago #
Hey Guys,
I lost some code in header.php and I need it back. It is specifically the H2 tag for the site description near line 108 I think. I lost the whole H2 tag and now my site description doesn't show up. Can anybody paste the code over here for me? Thanks.
- AM
bartsurminski
Member
Posted 10 months ago #
Don't know the Line number, but i suppose it's this piece: (only part with H2 in it)
<body <?php body_class(); ?>>
<div id="page" class="hfeed">
<header id="branding" role="banner">
<hgroup>
<h1 id="site-title"><span><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></h1>
<h2 id="site-description"><?php bloginfo( 'description' ); ?></h2>
</hgroup>
abdumayet
Member
Posted 10 months ago #
Thanks dude! That worked. Also, do you know how I can align my fb login button to the right under the search bar?
bartsurminski
Member
Posted 10 months ago #
Must say i'm not that into php, copy paste of code is something i'm able to, aligning tables is another story ;)
abdumayet
Member
Posted 10 months ago #
hahaha much like my abilities. thanks anyway!
zerpex
Member
Posted 10 months ago #
Honestly I'm wondering, how can this be a part of this topic?
Niraj Chauhan
Member
Posted 10 months ago #
Hey after a long digging, finally I am ready with Twenty Eleven Child Theme which enables sidebar not only on posts, but also on pages
So only one child theme, which will get sidebar on the entire site
http://webstutorial.com/wordpress-twenty-eleven-theme-sidebar-pages-posts/content-management-system-cms
@ Niraj Chauhan: it finally works! thx
hwilke01
Member
Posted 8 months ago #
Hey folks- I created a child theme based on the Twenty Eleven them... but for some reason a few features aren't working. Specifically, the right column doesn't want to add anything I add to it in the widgets area.
http://www.transactioncoordinator.net
Any ideas why? Is there something special I need to do when creating a child theme other than copying and renaming the theme title in the style.css? Many thanks in advance.
@hwilke01
have you edited page.php and added <?php get_sidebar(); ?> before the 'get_footer' line?
or assigned the 'sidebar template' to that page?
hwilke01
Member
Posted 8 months ago #
No I haven't. Should I? Will that fix it?
No I haven't. Should I? Will that fix it?
that will hopefully fix your problem.
hwilke01
Member
Posted 8 months ago #
@alchymyth thanks for the help. Adding that line to the pages.php added the content from the sidebar text widget, but it isn't placed properly. Take a look: http://www.transactioncoordinator.net
Any ideas? (and thank you for your help)
unfortunately it is not that simple in twenty eleven;
have a look in here http://www.transformationpowertools.com/wordpress/twenty-eleven-sidebar-on-single-posts-and-pages
or, possibly easier, as Twenty Eleven already comes with a ready made page template for pages with sidebar, remove the <?php get_sidebar(); ?> again from page.php,
and use the 'Sidebar Template' for that page (page ID 128) under dashboard -> pages -> edit page -> attributes - page template
Thank you so much bartsurminski.
It works perfectly. Actually I’ was in a big trouble how to solve this. I was thinking about to switch back to twentyten theme. But your tutorial to add sidebar helped me.
Thank you so much Bart. Cheers :)