Abland
|
Hi,
Figured it was easiest to start a new thread on this since there were a few asking about a slideshow above the content and sidebars. I just add a sidebar then use the slideshow widget.
For Artisteer 4.1
In your theme's "library/sidebars.php" approx. line 12 find:
theme_add_sidebar('secondary', 'secondary-widget-area', __('Secondary Widget Area', THEME_NS), __("This sidebar is active only on a 3 column setup.", THEME_NS));
Copy that code section and paste it back in - I chose to paste it in above the "theme_add_sidebar('top', " (approx. line 18)
Modify the pasted code as shown - replacing secondary with slider:
theme_add_sidebar('slider', 'slider-widget-area', __('Slider Widget Area', THEME_NS), __("This sidebar is active in the full width slider.", THEME_NS));
In wp-admin Appearance>Widgets you now have the Slider Widget Area.
In your theme's root create a new file, "sidebar-slider.php" and add the following:
<?php theme_print_sidebar('slider-widget-area', '<div class="art-layout-cell art-sidebar3 clearfix">', '</div>'); ?>
Your prefix might not be art- so adjust accordingly.
In your theme's "header.php" find where the menu ends if it's below the header:
</nav>
or find where the header ends if the menu is inside it or above:
</header>
Below the closing tag that applies to your site paste:
<div class="wide-slider"><?php get_sidebar('slider'); ?></div>
Then in style.css add:
.wide-slider {
position: relative;
display: block;
width: 1000px;
height: auto;
margin: 0 auto;
padding: 0;
}
Set the width you need for your site.
Add your slider widget to the Slider Widget Area and it will play above sidebars and content.
|
|
donhx
|
Thanks for this. Wish this information had been available before.
I went ahead and bought Templateer and adding the slider like this just took a couple clicks.
Still not sure why Artisteer has not added a slideshow above the content and sidebars... it is available on all the other templates you can generate with Artisteer.
|
|
Baldwin
|
Thanks you Abland...great solution.I have tried to implement the code even above the footer and below the sidebar. It works if I put the code (last string before the CSS-code above) in the footer.php. But in IE7 the sidebars will be placed at the bottom of the screen below new widget area. 7 (it works in all recent browser)
The slider-widget-area ,your code, works with all browser I've testet.
Do you know why the "slider-widget-area" below does'nt work in IE7 (probably not in IE8 too, not tested)
|
|
Baldwin
|
Once again Abland, thanks for code. This is exactly the solution I've been looking for.
I would also be grateful for a tip on how to place a widget area under the sidebar and above the footer.
See my previous post
|
|
speedyp
|
Just used this on a new project - Thanks for sharing
|
|
Jacobrk
|
Great. Helpful information.
Can I do something similar if I just want to add a widget area the width of my site for other things, say like a text widget(then I can add image there)
|
|
speedyp
|
@Jacobrk
You're just creating a new widget area and you can stick anything you want in there. Abland's called it "slider", but the name doesn't really matter - so call it "my_image".. or "Bob" if you like :)
|
|
aledreams
|
Hi, i have a question about this, i use this code and all function very well, but if i see my layout in to phone the slide widget apear over the menu... can you hel me please? do i must to insert other css code? thank you
|
|
GFI
|
OMFG!!! Have a virtual hug.... you don't know how much this has helped.... many thanks :)
Agree with a few of the replies... this NEEDS to be a function for the future.
|
|
Scarlet
|
Actually I don't know how to thank you for this.
It really helped me.
|
|
Chris Jakubowski
|
Awesome write up - really saved my bacon with current project thank you so much for taking the time to write this out you are a selfless superstar Abland!
|
|
Alex Lee
|
So it is actually a "three-column" template, but you replace the "first column" with the slider?
|
|