How do I shift widget areas on Lifestyle Pro theme?

Community Forums Forums Design Tips and Tricks How do I shift widget areas on Lifestyle Pro theme?

This topic is: not resolved

This topic contains 6 replies, has 3 voices, and was last updated by  John Chadwick 3 months, 2 weeks ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #107546

    brightisland
    Participant
    Post count: 20

    I’d like to be able to have the Home-Middle widget block switch places with the Home-Bottom-Left and Home-Bottom-Right widget areas on the Lifestyle Pro theme.

    I don’t want to add or remove any areas, just reposition them on the home page.

    How would I do that?

    Thanks in advance!

    #107574

    AC
    Blocked
    Post count: 7712

    You have to modify the front-page.php file. It might be tricky. Email me on my website and I will send you an edited version of the file. You can back up your original before loading the file you get from me.

    #107620

    AC
    Blocked
    Post count: 7712

    I sent you an email. I had walked away and fell asleep. I am almost finished so watch your email.

    #107653

    John Chadwick
    Member
    Post count: 12

    I have managed to create an extra widget area on the home page underneath the bottom-left and bottom-right widgets. I had to edit the functions.php, front-page.php and the style.css. I can post a solution here if anitac has not already provided the answer?

    #108029

    brightisland
    Participant
    Post count: 20

    John – I think I can certainly use your solution if you wouldn’t mind sharing it.

    Adding a widget would accomplish what I need, while leaving the other widgets, as well. :)

    • This reply was modified 3 months, 4 weeks ago by  brightisland.
    • This reply was modified 3 months, 4 weeks ago by  brightisland.
    #108187

    John Chadwick
    Member
    Post count: 12

    Hi Brightisland,

    I am in the middle of a build site which can be seen here. The site has been modified to add an extra widget to the home page whilst maintaining the default widgets.

    You will need to edit the following files of your child theme…I have posted my new edits;

    front-page.php
    functions.php
    style.css

    Edit FRONT-PAGE.PHP by adding the emboldened code;

    function lifestyle_home_genesis_meta() {

    if ( is_active_sidebar( ‘home-top’ ) || is_active_sidebar( ‘home-middle’ ) || is_active_sidebar( ‘home-bottom-left’ ) || is_active_sidebar( ‘home-bottom-right’ ) || is_active_sidebar( ‘home-extra’ ) ) {

    // Force content-sidebar layout setting
    add_filter( ‘genesis_pre_get_option_site_layout’, ‘__genesis_return_content_sidebar’ );

    // Add lifestyle-pro-home body class
    add_filter( ‘body_class’, ‘lifestyle_body_class’ );

    // Remove the default Genesis loop
    remove_action( ‘genesis_loop’, ‘genesis_do_loop’ );

    // Add homepage widgets
    add_action( ‘genesis_loop’, ‘lifestyle_homepage_widgets’ );

    // FNB CUSTOM – add extra home page widget
    add_action( ‘genesis_loop’, ‘fnb_homepage_widgets’ );

    }
    }

    function lifestyle_homepage_widgets() {

    genesis_widget_area( ‘home-top’, array(
    ‘before’ => ‘<div class=”home-top widget-area”>’,
    ‘after’ => ‘</div>’,
    ) );

    genesis_widget_area( ‘home-middle’, array(
    ‘before’ => ‘<div class=”home-middle widget-area”>’,
    ‘after’ => ‘</div>’,
    ) );

    if ( is_active_sidebar( ‘home-bottom-left’ ) || is_active_sidebar( ‘home-bottom-right’ ) ) {

    echo ‘<div class=”home-bottom”>’;

    genesis_widget_area( ‘home-bottom-left’, array(
    ‘before’ => ‘<div class=”home-bottom-left widget-area”>’,
    ‘after’ => ‘</div>’,
    ) );

    genesis_widget_area( ‘home-bottom-right’, array(
    ‘before’ => ‘<div class=”home-bottom-right widget-area”>’,
    ‘after’ => ‘</div>’,
    ) );

    echo ‘</div>’;

    }
    }

    //FNB CUSTOM – Added Home Extra widget area
    function fnb_homepage_widgets() {

    genesis_widget_area( ‘home-extra’, array(
    ‘before’ => ‘<div class=”home-extra widget-area”>’,
    ‘after’ => ‘</div>’,
    ) );

    }

    Edit FUNCTIONS.PHP by adding the emboldened code;

    //* FNB CUSTOM – Register Home Extra Area
    genesis_register_sidebar( array(
    ‘id’ => ‘home-extra’,
    ‘name’ => __( ‘Home – Extra’, ‘fastnicheblogstheme’ ),
    ‘description’ => __( ‘This is the home page extra widget area’, ‘fastnicheblogstheme’ ),
    ) );

    EDIT STYLE.CSS by adding;

    /*FNB CUSTOM for Home Extra widget*/
    .home-extra {
    float:left;
    }

    I hope the above helps

    Kind Regards

    John Chadwick

    • This reply was modified 3 months, 3 weeks ago by  John Chadwick.
    • This reply was modified 3 months, 3 weeks ago by  John Chadwick.
    • This reply was modified 3 months, 3 weeks ago by  John Chadwick.
    • This reply was modified 3 months, 3 weeks ago by  John Chadwick.
    • This reply was modified 3 months, 3 weeks ago by  John Chadwick.
    • This reply was modified 3 months, 3 weeks ago by  John Chadwick.
    #110406

    John Chadwick
    Member
    Post count: 12

    Hi Brightisland,

    I am afraid I have had to revert the build site back to basic Lifestyle theme as that’s the way teh client wants it. When I have finished the work I will set up a dummy theme and repost the code to change the widgets on the Lifestyle pro home page (front-page)

    The code I have already posted will work, I just can’t show it for the moment.

    Kind regards

    John Chadwick

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.