• 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

Fabric theme homepage 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 › Design Tips and Tricks › Fabric theme homepage slider?

This topic is: not resolved
  • This topic has 16 replies, 3 voices, and was last updated 13 years, 5 months ago by Brad Dalton.
Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • March 19, 2013 at 9:42 am #29407
    vanhovland
    Member

    Hi I have begun building a site using Fabric: http://96.127.180.186/~mvmontes/

    I would like to add a slider to the homepage similar to this site: http://www.yourecofriend.com/

    Can anyone point me in the right direction?

    Thanks!

    March 19, 2013 at 10:00 am #29409
    Carolyn
    Participant

    Here's what I did.

    I added a widget area just below the secondary navigation.
    To the function.php I add the code

    /** Register widget areas */
    genesis_register_sidebar( array(
    'id' => 'home-top',
    'name' => __( 'Home Top', 'fabric' ),
    'description' => __( 'This is the top section of the homepage', 'fabric' ),
    ) );

     

    Then I created a home.php and added

    <?php
    /** Add home top widget area */
    add_action( 'genesis_after_header', 'home_top' );

    function home_top() {
    dynamic_sidebar( 'home-top' );
    }

    genesis();

     

    After that I went to Appearances > Widgets

    and in my new widget area Saw there was an area called Home Top.
    In that widget, I put the Genesis Responsive Slider.

    March 19, 2013 at 10:15 am #29411
    vanhovland
    Member

    when I try to add that code to my function.php I get this:

    Parse error: syntax error, unexpected T_STRING in /home/mvmontes/public_html/wp-content/themes/fabric/functions.php on line 39

    March 19, 2013 at 10:22 am #29413
    Carolyn
    Participant

    Check that you aren't missing a semi-colon or something in the code.

    March 19, 2013 at 11:45 am #29429
    vanhovland
    Member

    Thanks for your help so far, but I am still having problems, I am copying and pasting your coding from above:

    /** Register widget areas */
    genesis_register_sidebar( array(
    ‘id’ => ‘home-top’,
    ‘name’ => __( ‘Home Top’, ‘fabric’ ),
    ‘description’ => __( ‘This is the top section of the homepage’, ‘fabric’ ),
    ) );

    and I keep getting errors and have to restore my function.php through my file manager. I am fairly new to coding, so I am not sure how to check what it wrong.

    March 19, 2013 at 11:57 am #29434
    Brad Dalton
    Participant

    Delete that code and add this to the end of your child themes functions.php file.

    Grab the raw version of the code please.

    https://gist.github.com/5198288.git


    Tutorials for StudioPress Themes.

    March 19, 2013 at 12:04 pm #29439
    vanhovland
    Member

    Thanks Brad...I am almost there. Added the genesis slider. Only shows up if I list it as a post page, rather than a static one. Will the slider show up on a static front page or do I need to change something on the page that I want as the static one?

    Thanks again everyone for the help!

    March 19, 2013 at 12:10 pm #29442
    Carolyn
    Participant

    Okay, so I'm new to it and I added a slider the way I wrote, but I'd go with Brad's since he is probably more experienced.

    Brad - what is your code? Maybe I should change mine.

    March 19, 2013 at 12:16 pm #29444
    Brad Dalton
    Participant

    Hi Carolyn and @vanhovland.

    I just wrote that code for the home page but its really flexible. You can change the conditional tag to display based on any conditions and change the output based on the genesis hook locations.

    Let me know exactly what you want and i'll modify it on git.

     

    P.S Always grab the raw version of the code.


    Tutorials for StudioPress Themes.

    March 19, 2013 at 12:24 pm #29448
    vanhovland
    Member

    Brad,

    What I am wanting is a static front page (welcome is what I have called mine), that has the slider on it. Do I need to have a home.php file as Carolyn suggested, or just add the coding to the function.php. Does what I am wanting make sense?

    Thanks, Heidi

    March 19, 2013 at 12:35 pm #29453
    Carolyn
    Participant

    Here's where I am
    http://todd.carolyncreates.com/

    I've got the Genesis Slider in, but have space between the subnav and slider. I've also tried to update the slider but it won't (another topic)

    Should I change my code from above to the one you listed?

    March 19, 2013 at 12:35 pm #29455
    Brad Dalton
    Participant

    That's what the code does. It outputs the widget content on the home page only, in this case the slider and displays it full width before the content using the before content sidebar wrap hook.

    Paste the raw version of the code at the end of your child themes functions.php file.

    No home.php needed nor is it best practice to edit template files unless they are in the child theme.

    Keep all custom coding in the child themes style.css and functions.php files.


    Tutorials for StudioPress Themes.

    March 19, 2013 at 12:40 pm #29457
    vanhovland
    Member

    Great, that is clear, no home.php needed.

    The slider still only works when front page - your latest posts is selected. Will it work on a static front page as well?

    March 19, 2013 at 12:40 pm #29458
    Carolyn
    Participant

    Great, thanks Brad. I've now subscribed to your feed. I'm sure I'll learn a lot!

    March 19, 2013 at 12:44 pm #29461
    Brad Dalton
    Participant

    Yeah mostly Genesis Tutorials and code snippets at the moment so it should be useful Carolyn.


    Tutorials for StudioPress Themes.

    March 19, 2013 at 12:50 pm #29464
    Carolyn
    Participant

    Probably VERY USEFUL. I'm in the beginning (hacking) stages so I'm trying to learn as much as possible.

    Do you post much on G+?

    I'll follow you there too if you do.

    March 19, 2013 at 12:54 pm #29465
    Brad Dalton
    Participant

    Yep. I share all my new posts to a few social networks.


    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 17 posts - 1 through 17 (of 17 total)
  • The forum ‘Design Tips and Tricks’ 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

© 2026 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