• 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

Want Genesis Responsive Slider On Magazine Homepage (Keep Blog Format Beneath)

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 › Want Genesis Responsive Slider On Magazine Homepage (Keep Blog Format Beneath)

This topic is: not resolved

Tagged: genesis responsive slider, home.php, magazine theme

  • This topic has 1 reply, 2 voices, and was last updated 9 years, 10 months ago by Brad Dalton.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • October 28, 2013 at 11:16 am #69467
    ebatey
    Member

    Hi there! I'm hopeful one of you smart folks can help me with an issue I've been struggling with all weekend.

    I'm using the Magazine theme on my site (39nineteen.com). Though their demo homepage, with its multiple widgets looks great, I'd like a simpler blog-format look to my site. If you look at my site right now, you'll see that that's what I have.

    I only want one change: on the homepage, I'd like to add the Genesis Responsive Slider to the very top. Therefore, then my blog will look like this:

    Page one: slider and most recent posts
    Page two: (no slider) next most recent posts
    and so on and so on.

    However, when I add the Genesis Slider widget to the homepage at present, it removes the subsequent blog content from the page.

    I'm guessing from other forum posts on similar issues (to be clear, I couldn't find anything that specifically addressed the Magazine theme) that the solution might be something in my child theme's home.php file, which specifies "If no widgets active, display the default loop." My presumption is that the "default loop" is the standard blog format that I'm rocking right now.

    I edited the home.php page in my child theme to add the slider thusly, replacing

    if ( is_active_sidebar( 'home-top' ) ) {
    echo '<div class="home-top">';
    dynamic_sidebar( 'home-top' );
    echo '</div><!-- end .home-top -->';
    }

    With

    if ( is_active_sidebar( 'home-top' ) ) {
    echo '<div class="home-top">';
    dynamic_sidebar( 'home-top' );
    genesis_standard_loop();
    echo '</div><!-- end .home-top -->';
    }

    and it worked to a point -- however, the slider was now appearing on ALL pages, not just the homepage. So I obviously screwed that up. (This is a fix I got from a non-Studiopress forum and it wasn't Genesis-based-theme specific, so I think it's more than possible that it's not the fix that y'all might recommend. I can accept that.)

    Before I posted here, I contacted Copyblogger Media support, and while they were happy to tell me:

    > You already have a widget area for the slider, so you do not need to add code - you need to move it.

    > The code on the page says, If there are no widgets show the loop (the if... else..)

    > What you want to to move the home top widget code so it is above the posts loop.

    There's no "home top widget code" in the home.php page. However, they refused to offer any specifics or additional help with this, suggesting instead that I post my issue here.

    So that is what I am doing! Can one of you folks offer any assistance on what I'm doing wrong? I'd be remarkably grateful, if so. Thanks in advance.

    http://39nineteen.com/
    November 18, 2013 at 7:20 am #73928
    Brad Dalton
    Participant

    Not sure if you still need help with this however there's at least 2 ways to do this.

    1. You can add PHP code in your child theme functions.php file to hook in a new widget only on the front page of your site http://wpsites.net/web-design/adding-new-widget-areas-in-studiopress-themes/

    2. Or you can code it in your home.php file so it only displays in the position you place the code on your front page.

    The first option is more flexible and includes a conditional tag for the front page is_front_page() as well as a hook which determines the position on that page which the widget outputs your content


    Tutorials for StudioPress Themes & WooCommerce.

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 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

© 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