Executive Slider on Static Home Page

Community Forums Forums Design Tips and Tricks Executive Slider on Static Home Page

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  AC 1 year, 11 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #5171

    Axman1413
    Participant

    Nick asked me to post this support question here:

    “I am working with the Executive child theme. We would like the Responsive Slider to appear in full width only on the custom static home page with a layout of content-sidebar (rather than the slider being included in the content area and reduced in size).

    We don’t want the slider on all pages, and we want the simple blog layout on the front page. There is no Hook for adding anything just to the is_front_page(). Can you provide me with the best option to get this result.”

    http://new.petethomas.com/

    In the time I was waiting for a reply, I figured out how to do it.

    First I used about 3 different code alterations to get the following code. It is a widget I registered, and called to appear only on the is_front_page. The client wanted the full slider to show across the top, with the latest posts and the sidebar underneath it. The Genesis Layout Extras Plugin would get the desired results partially. The slider would appear above the post entry content, but the sidebar would appear to the right of both the post entry content and the slider, which was resized responsively to fit above the post entry content.

    So I figured this out and added it to the Child Theme’s function.php:

    /** Register widget areas */
    genesis_register_sidebar( array(
    'id' => 'welcome-text',
    'name' => __( 'Welcome Text', 'genesis' ),
    'description' => __( 'This is the welcome text widget.', 'executive' ),
    ) );

    /** Add the welcome text section */
    add_action( 'genesis_before_content_sidebar_wrap', 'custom_welcome_text' );
    function custom_welcome_text() {
    if ( is_front_page())
    genesis_widget_area( 'welcome-text', array(
    'before' => '',
    ) );
    }

    ***Please note that the &gt should be a “>” sign. Not sure why the code is not showing properly in the wrapped html.

    Thanks,

    Johnny

    • This topic was modified 1 year, 11 months ago by  Axman1413.
    • This topic was modified 1 year, 11 months ago by  Axman1413.
    • This topic was modified 1 year, 11 months ago by  Axman1413.
    • This topic was modified 1 year, 11 months ago by  Axman1413.
    • This topic was modified 1 year, 11 months ago by  Axman1413.
    • This topic was modified 1 year, 11 months ago by  Axman1413.
    #5210

    AC
    Blocked
    Post count: 7712

    I found some instruction on the old forum that says:

    In the Home.php – remove this line below:

    remove_action( ‘genesis_loop’, ‘genesis_do_loop’ );

    and then… remove this line also:

    add_filter( ‘genesis_pre_get_option_site_layout’, ‘__genesis_return_full_width_content’ );

    It seemed to work for the person who asked initially.

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

You must be logged in to reply to this topic.