Community Forums › Forums › Archived Forums › Design Tips and Tricks › Smart Passive Income Theme
Tagged: slider, Smart Passive Income
- This topic has 6 replies, 2 voices, and was last updated 8 years, 1 month ago by Brad Dalton.
-
AuthorPosts
-
November 3, 2016 at 12:40 pm #195674mboetgerParticipant
I put a slider in the Front Page 2 widget of the Smart Passive Income theme, but the slider is not going full width (probably because there is formatting for a background image). So where do I find the code to make the change that I want?
http://www.5210go.org/November 3, 2016 at 9:40 pm #195704Brad DaltonParticipantNovember 4, 2016 at 12:27 pm #195735mboetgerParticipantI have taken the site off of maintenance mode.
November 4, 2016 at 4:27 pm #195746Brad DaltonParticipantI think you would need to remove all the padding as well as the wrap class generated in the call to the front page 2 widget in the front-page.php file. Try that for starters.
November 4, 2016 at 5:09 pm #195747mboetgerParticipantWhat do I replace the wrap class with? Every area has the wrap class.
if ( is_active_sidebar( 'front-page-1' ) || is_active_sidebar( 'front-page-2' ) || is_active_sidebar( 'front-page-3-a' ) || is_active_sidebar( 'front-page-3-b' ) || is_active_sidebar( 'front-page-4' ) ) {//* Add front-page body class
add_filter( 'body_class', 'spi_body_class' );//* Force full width
add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' );//* Add the scripts and styles
add_action( 'wp_enqueue_scripts', 'spi_home_scripts_and_styles' );//* Remove default loop
remove_action( 'genesis_loop', 'genesis_do_loop' );//* Add the widget areas
add_action( 'genesis_loop', 'spi_home_widget_loop' );//* Modify the read more link
add_filter( 'get_the_content_limit', 'spi_content_limit_read_more_markup', 10, 3 );}
}
//* Front page body class
function spi_body_class( $classes ) {$classes[] = 'front-page';
return $classes;
}
//* Front page scripts and styles
function spi_home_scripts_and_styles() {wp_enqueue_style( 'front-page-styles', get_stylesheet_directory_uri() . '/css/front-page.css', array(), CHILD_THEME_VERSION );
}
//* Function to output active widget areas
function spi_home_widget_loop() {echo '<h2 class="screen-reader-text">' . __( 'Main Content', 'smart-passive-income-pro' ) . '</h2>';
genesis_widget_area( 'front-page-1', array(
'before' => '<div class="flexible-widgets front-page-1 color' . spi_widget_area_class( 'front-page-1' ) . ' widget-area"><div class="wrap">',
'after' => '</div></div>',
) );genesis_widget_area( 'front-page-2', array(
'before' => '<div class="flexible-widgets front-page-2 image' . spi_widget_area_class( 'front-page-2' ) . ' widget-area"><div class="wrap">',
'after' => '</div></div>',
) );genesis_widget_area( 'front-page-3-a', array(
'before' => '<div class="flexible-widgets front-page-3 front-page-3-a color' . spi_widget_area_class( 'front-page-3-a' ) . ' widget-area"><div class="wrap">',
'after' => '</div></div>',
) );genesis_widget_area( 'front-page-3-b', array(
'before' => '<div class="flexible-widgets front-page-3 front-page-3-b color' . spi_widget_area_class( 'front-page-3-b' ) . ' widget-area"><div class="wrap">',
'after' => '</div></div>',
) );genesis_widget_area( 'front-page-4', array(
'before' => '<div class="flexible-widgets front-page-4' . spi_widget_area_class( 'front-page-4' ) . ' widget-area"><div class="wrap">',
'after' => '</div></div>',
) );}
//* Modify the read more link
function spi_content_limit_read_more_markup( $output, $content, $link ) {$output = sprintf( '<p>%s …</p>%s', $content, str_replace( '…', '', $link ) );
return $output;}
November 4, 2016 at 5:19 pm #195748Brad DaltonParticipantWhat happens if you remove the wrap class from front-page-2 and then remove the padding in the CSS?
genesis_widget_area( 'front-page-2', array( 'before' => '<div class="flexible-widgets front-page-2 image' . spi_widget_area_class( 'front-page-2' ) . ' widget-area">', 'after' => '</div>', ) );
November 4, 2016 at 9:59 pm #195752Brad DaltonParticipantAlso, i noticed the CSS for flexible widgets adds padding and margin. When i removed it in Chrome Inspector, the slider covers the entire widget area.
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.