Jump to content
Sign in to follow this  
hansonexperience

Lower Sidebar above Accordian Sidebar

Recommended Posts

hansonexperience

I would like to have some widgets above the accordion sidebar. How can I do that? With the lower sidebar I can put them below, but I also want some elements above it. See my weblog: http://www.hansonexperience.com

Share this post


Link to post
Share on other sites
intellagentz

Unless I'm misunderstanding the question... Can you not just add the new widget to the same sidebar you have the accordian in, but drag it to the position above it? FYI the sidebars can hold multiple widgets, each of which can be positioned in the order of your choosing.

Share this post


Link to post
Share on other sites
hansonexperience

@Carl I tried to put a widget in the main_sidebar. Iblogpro has section in which to put the widgets. One of them is the Accordion sidebar which is now the default one. Another one is the Lower sidebar, in which some widget can be seen. Put I cannot put a widget in main_sidebar section.

Share this post


Link to post
Share on other sites
hansonexperience

@catherina no. when I put a widget in it I does not show. I tried it with the standard widget like recent post and comments

Share this post


Link to post
Share on other sites
hansonexperience

@catrina I see the main_sidebar section in Appearance>Widget but I have the accordion sidebar as default. Now I want one or more widgets above the accordion sidebar like the lower sidebar.

Share this post


Link to post
Share on other sites
cmunns

You would have to edit some code in sidebars.php Mainly you will have to change the if and else statements. I think in this case you could even just add this code ` <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?> <?php if(!pagelines('sidebar_no_default')) get_template_part('library/_defaultsidebar');?> <?php endif; ?> ` right after this line: `<?php if(VPRO) get_template_part('library/_grandchildnav');?>`

Share this post


Link to post
Share on other sites
hansonexperience

@adam I think your code is not complete. I cannot see all of it. Now I have

<?php if(VPRO && pagelines('the_sidebar', $pagelines_ID) == 'accordion'):?>
				<div id="accordion">
				<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Accordion Sidebar') ) : ?>
					<h3 id="" class=" accordion_sidebar drawer-handle"><?php _e("Add Widgets", TDOMAIN);?></h3>
					<div class="drawer-content">
						<div class="pad_small">
							<?php _e('The accordion sidebar has been selected but doesn't have any widgets. Add some widgets to your secondary sidebar in the admin under appearance > widgets.',TDOMAIN);?>
						</div>
					</div>
				<?php endif; ?>
				</div>

Share this post


Link to post
Share on other sites
hansonexperience

@adam ok entered your code. That works, but.....in the _defaultsidebar some widgets are entered. Where can I change this. Do I need to do that in the template part manually? I want to do that in the Appearance>Widget menu

Share this post


Link to post
Share on other sites
hansonexperience

@adam I found the trick:

<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
					<?php if(!pagelines('sidebar_no_default')) get_template_part('library/main_sidebar');?>
				<?php endif; ?>

Put this in the sidebar.php at the place you suggested. Thx

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×