• Hi

    Really nice theme

    Is it possible to add the Home Widget section (from the Homepage Page Template) to the Full Width Page Template?

    Many thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author modernthemesnet

    (@modernthemesnet)

    WLJS,

    This would require some theme modification. If you choose to do this, you will have to copy/paste the widget code from the page-home.php template file into the page-fullwidth.php template file.

    Make sure to also do it with a child theme so future updates don’t override your changes.

    Thanks!

    Thread Starter WLJS

    (@wljs)

    Hi

    Thanks for your reply.

    Just confirming-is it the code below that needs to be copied and where is it best to paste it in the page-fullwidth.php template file?

    Thanks

    <?php if( get_theme_mod( ‘active_home_widget’ ) == ”) : ?>

    <div class=”home-cta” style=”background: url(<?php echo esc_url( get_theme_mod( ‘sensiblewp_new_widget_area_background’ )); ?>) no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover;”>
    <div class=”grid grid-pad”>

    <?php $widget_columns = get_theme_mod( ‘sensiblewp_widget_columns’ );
    if( $widget_columns != ” ) {
    switch ( $widget_columns ) {
    case ‘option1’:
    // Do nothing. all services are displayed.
    break;
    case ‘option2’:
    echo ‘<style type=”text/css”>’;
    echo ‘.sensible-home-widget-area .widget { width: 50%; float:left; padding-right: 30px; }’;
    echo ‘@media handheld, only screen and (max-width: 767px) {‘;
    echo ‘.sensible-home-widget-area .widget { width: 100%; float:none; padding-right: 0px; }’;
    echo ‘}’;
    echo ‘</style>’;
    break;
    case ‘option3’:
    echo ‘<style type=”text/css”>’;
    echo ‘.sensible-home-widget-area .widget { width: 33.33%; float:left; padding-right: 30px; }’;
    echo ‘@media handheld, only screen and (max-width: 767px) {‘;
    echo ‘.sensible-home-widget-area .widget { width: 100%; float:none; padding-right: 0px; }’;
    echo ‘}’;
    echo ‘</style>’;
    break;
    case ‘option4’:
    echo ‘<style type=”text/css”>’;
    echo ‘.sensible-home-widget-area .widget { width: 25%; float:left; padding-right: 30px; }’;
    echo ‘@media handheld, only screen and (max-width: 767px) {‘;
    echo ‘.sensible-home-widget-area .widget { width: 100%; float:none; padding-right: 0px; }’;
    echo ‘}’;
    echo ‘</style>’;
    break;
    }
    } ?>

    <div class=”sensible-home-widget-area”>

    <div class=”col-1-1″>

    <?php if ( get_theme_mod( ‘home_widget_icon’ ) ) : ?>

    <i class=”fa <?php echo esc_html( get_theme_mod( ‘home_widget_icon’ )); ?>”></i>

    <?php endif; ?>

    </div><!– col-1-1 –>

    <div class=”col-1-1″>

    <?php if ( is_active_sidebar(‘home-widget’) ) : ?>

    <?php dynamic_sidebar(‘home-widget’); ?>

    <?php endif; ?>

    </div><!– col-1-1 –>

    <div class=”col-1-1″>

    <?php if ( get_theme_mod( ‘sensiblewp_widget_button_url’ ) ) : ?>
    “>
    <?php if ( get_theme_mod( ‘sensiblewp_widget_button_text’ ) ) : ?>
    <button class=”outline white”><?php echo esc_html( get_theme_mod( ‘sensiblewp_widget_button_text’ )); ?></button>
    <?php endif; ?>

    <?php endif; ?>

    </div><!– col-1-1 –>

    </div><!– sensible-home-widget-area –>

    Theme Author modernthemesnet

    (@modernthemesnet)

    You would have to copy the section wrapped in div.sensible-home-widget-area

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Home widget section on full width template’ is closed to new replies.