• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Agency Theme Static Homepage with Slider

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Agency Theme Static Homepage with Slider

This topic is: resolved

Tagged: Agency, slider, static

  • This topic has 8 replies, 3 voices, and was last updated 10 years, 5 months ago by dpbklyn.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • February 25, 2013 at 5:45 am #22668
    TowelsRus
    Member

    Hi,

    I wanted to setup our homepage to use the responsive slider widget, however i can only do so if the homepage uses recent posts and is not set to static page.

    Do you know any work around for this?

    Thanks Craig

    February 25, 2013 at 6:48 am #22676
    Brad Dalton
    Participant

    Add a widget area to a static page using this tutorial http://designsbynickthegeek.com/tutorials/add-widgeted-sidebar

    Change the conditional tag to match your custom home page

    is_page('007') or is_home()
    

    Modify this code and change the hook location and conditional tag:

    add_action( 'genesis_after_post_content', 'child_after_post_box' );
    /** Loads a new sidebar after the post on single pages*/
    function child_after_post_box() {
     
        if( is_single() ) {
            echo '<div class="after-post-box">';
                dynamic_sidebar( 'after-post-box' );
            echo '</div>';
        }
    }
    

    or use this and use the Widget Logic plugin http://www.briangardner.com/welcome-text-widget/


    Tutorials for StudioPress Themes & WooCommerce.

    February 25, 2013 at 7:12 am #22683
    TowelsRus
    Member

    Thanks Brad, I'll have a play with it.

    Regards

    Craig

    April 5, 2013 at 10:30 am #33317
    dpbklyn
    Member

    Hello Brad,

    Thank you in advance.

     

    I am trying to add a slider under the header in my Agency theme and I followed the direction above, but I am not able to see it.  I can see the sidebar in my widgets control panel.  I think I am having trouble identifying the page name/number.  I am using this particular page as my home page (static).  My code is below:

    genesis_register_sidebar( array(
    'id' => 'after-header-testl',
    'name' => 'After Header Slider',
    'description' => 'This is a sidebar that goes after the header.',
    ) );

    add_action( 'genesis_after_header', 'child_after_header_testl_sidebar' );
    /** Loads a new sidebar after the header */
    function child_after_header_testl_sidebar() {

    if( is_home() ) {
    echo '<div class="after-header-testl">';
    dynamic_sidebar( 'after-header-testl' );
    echo '</div>';
    }

    }

    Thank you...

    dp


    David Phillips
    Owner, St. Louis IT Solutions, LLC

    April 5, 2013 at 10:31 am #33318
    dpbklyn
    Member

    Hello Brad,

    Thank you in advance.

     

    I am trying to add a slider under the header in my Agency theme and I followed the directions above, but I am not able to see it.  I can see the sidebar in my widgets control panel.  I think I am having trouble identifying the page name/number.  I am using this particular page as my home page (static).  My code is below:

    genesis_register_sidebar( array(
    'id' => 'after-header-testl',
    'name' => 'After Header Slider',
    'description' => 'This is a sidebar that goes after the header.',
    ) );

    add_action( 'genesis_after_header', 'child_after_header_testl_sidebar' );
    /** Loads a new sidebar after the header */
    function child_after_header_testl_sidebar() {

    if( is_home() ) {
    echo '<div class="after-header-testl">';
    dynamic_sidebar( 'after-header-testl' );
    echo '</div>';
    }

    }

    Thank you...

    dp


    David Phillips
    Owner, St. Louis IT Solutions, LLC

    April 5, 2013 at 11:04 am #33326
    dpbklyn
    Member

    Whoops, sorry for the duplicate posts...

    UPDATE:

    Here is an update.  When I changed the page name to another non-static page it seems that the slider is finding its way onto the page.  Actually what happens is that the page goes blank when I change the code to have the widget put on that page.  I guess this is progress?

     

    Thank you still...

    dpbklyn


    David Phillips
    Owner, St. Louis IT Solutions, LLC

    April 5, 2013 at 11:30 am #33331
    Brad Dalton
    Participant

    Try this:

    https://gist.github.com/braddalton/5285591


    Tutorials for StudioPress Themes & WooCommerce.

    April 5, 2013 at 11:37 am #33333
    dpbklyn
    Member

    Brad,

    Thank you for getting back to me, but it doesn't seem that I Have access to that repository.  Actually, I can't find that repo on github.

    The code just populated...never mind.

     

    Thank you,

    dp


    David Phillips
    Owner, St. Louis IT Solutions, LLC

    April 5, 2013 at 1:10 pm #33351
    dpbklyn
    Member

    YAHOO!!!

    Thank you,  All I have to do is style it now.

    dp


    David Phillips
    Owner, St. Louis IT Solutions, LLC

  • Author
    Posts
Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble