Shortening Slider Content Area Correctly?
-
Hello all,
I am trying to have the slider on the homepage of my site centered on the left side, allowing just enough room on the right side for the sidebars to jump up to the header. Below I will provide the current command I’m using for this and my website is http://www.newagehiphop.com to reference what I’m speaking of. Currently, if you look at my site, you’ll see the slider has completely centered and allowed the left sidebar to come next to it as well, I do not want this. Also, because the slider has shrunken so much it is cutting off all text. All I need is to extend the slider back to the left, while still allowing the right sidebar to remain where it is. Any help will be appreciated.
Thank you,
Jenness
$my_home_slider_height = ‘400’; /*in pixels*/
function is_home_slider(){
$tc_front_slider = TC_utils::$inst->tc_opt( ‘tc_front_slider’ );
return ( tc__f(‘__is_home’) && $tc_front_slider && method_exists(‘TC_slider’, ‘tc_slider_display’) );
}add_action(‘template_redirect’, ‘my_home_slider_in_content’, 100);
function my_home_slider_in_content(){
if ( ! is_home_slider() )
return;
/* move the slider inside the #content */
remove_action(‘__after_header’, array(TC_slider::$instance, ‘tc_slider_display’));
add_action(‘__before_loop’, array(TC_slider::$instance, ‘tc_slider_display’), 0);add_filter(‘tc_slider_height’, ‘my_home_slider_height’);
function my_home_slider_height(){
global $my_home_slider_height;
return $my_home_slider_height;
}
add_filter(‘tc_print_inline_style_css’, ‘__return_true’);//new responsive ratios for such a small slider, just for small viewports
add_filter( ‘tc_slider_resp_shrink_ratios’, ‘my_responsive_ratios’);
function my_responsive_ratios( $_ratios ){
return array( ‘480’ => 0.718 );
}}
add_filter(‘tc_slider_layout’, ‘force_full’);
function force_full( $layout ){
return is_home_slider() || $layout;
}// Uncomment this if needed
// This is a trick
add_filter(‘tc_slider_img_size’, ‘my_slider_size’);
function my_slider_size( $size){
$my_size = ”; /*it can be the boxed one => ‘slider’ or even nothing,
which is a trick to not use the default slider sizes
*/
return is_home_slider() ? $my_size : $size;
}
The topic ‘Shortening Slider Content Area Correctly?’ is closed to new replies.
