• 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

Is it possible to add a slider below the header in eleven40-Pro?

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 › Is it possible to add a slider below the header in eleven40-Pro?

This topic is: not resolved

Tagged: Eleven40-Pro, slider

  • This topic has 11 replies, 2 voices, and was last updated 8 years, 9 months ago by Brad Dalton.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • June 24, 2014 at 7:43 am #111286
    tproud
    Member

    Hi, I would like to add a full-width slider right under the header in eleven40-Pro theme. Does anyone know if it is at all possible? Thank you!

    June 24, 2014 at 8:19 am #111290
    Brad Dalton
    Participant

    You can hook in a widget for the slider or hook in the slider directly using a template tag,

    Depends on which slider you choose.

    This is the best solution in my opinion http://wpsites.net/best-plugins/installing-full-width-responsive-slider/


    Tutorials for StudioPress Themes.

    June 24, 2014 at 1:47 pm #111340
    tproud
    Member

    Thanks, Brad. I would like to use a Genesis slider throughout the site, not just on home page. Should I do any changes to the code you gave me? Thank you.

    June 24, 2014 at 10:33 pm #111386
    Brad Dalton
    Participant

    The Genesis slider includes one widget so it can only be used once unless you want to display the same slider in different positions/pages.


    Tutorials for StudioPress Themes.

    June 25, 2014 at 5:47 am #111437
    tproud
    Member

    Hi Brad,

    OK, I guess it's not crucial to use the Genesis slider. I just need something to use throughout the site - one below the header and one with different content above the footer, too. Is there a solution for that?
    Meanwhile, I have tried using your code at http://wpsites.net/best-plugins/installing-full-width-responsive-slider/. I have installed the Responsive WordPress Slider - Soliloquy Lite and created a test slider which prompted me to use the following template tag:

    if ( function_exists( 'soliloquy' ) ) { soliloquy( '30' ); }

    I have inserted it at the end of the home.php file but it has not worked. Should I insert the template tag in a different file? Should it be worded differently? Or should I make changes in your code? Your code says:

    add_action( 'genesis_after_header', 'home_slider', 9 );
    /**
    * @author Brad Dalton - WP Sites
    * @example http://wpsites.net/best-plugins/installing-full-width-responsive-slider/
    */
    function home_slider() {
    if ( function_exists( 'soliloquy_slider' ) )
    soliloquy_slider( 'home-page' ); }

    See, the template tag says if ( function_exists( 'soliloquy' ) while your code says if ( function_exists( 'soliloquy_slider' ). In which of these should I make the changes? And in what file should I put the template tag? Thank you so much for your help.

    June 25, 2014 at 6:32 am #111440
    tproud
    Member

    Okay, I have changed home-page in your code to the number of my slider and now it displays (YAY!!!) but not exactly where I wanted: http://aviation-standards.com/. I want it to be centered on the page and display directly between the "Double the Safety - Half the Cost!" tagline and the (nav menu + content). Hope it makes sense. Thanks so much!

    June 25, 2014 at 6:49 am #111442
    tproud
    Member

    I have changed the ‘genesis_after_header’ to ‘genesis_before_content’ and the location is correct now but still the slider is not centered: http://aviation-standards.com/. How can I do that?

    Also, I tried adding the same code (your code from http://wpsites.net/best-plugins/installing-full-width-responsive-slider/) but with a different location (‘genesis_before_content’) and slider number, and everything got broken so I had to re-upload the functions.php file and add the first code again. Can I use two of your codes for different locations in functions.php, or is it impossible? Thank you!

    June 25, 2014 at 7:56 am #111456
    Brad Dalton
    Participant

    What was the error message?

    You can't use the same function name for anything in WordPress, they must be unique.


    Tutorials for StudioPress Themes.

    June 25, 2014 at 1:25 pm #111520
    tproud
    Member

    I have done it again and added the second code so both codes look like this:

    add_action( 'genesis_before_content', 'home_slider', 9 );
    /**
    * @author Brad Dalton - WP Sites
    * @example http://wpsites.net/best-plugins/installing-full-width-responsive-slider/
    */
    function home_slider() {
    if ( function_exists( 'soliloquy_slider' ) )
    soliloquy_slider( '30' ); }

    add_action( 'genesis_after_content', 'home_slider', 9 );
    /**
    * @author Brad Dalton - WP Sites
    * @example http://wpsites.net/best-plugins/installing-full-width-responsive-slider/
    */
    function home_slider() {
    if ( function_exists( 'soliloquy_slider' ) )
    soliloquy_slider( '32' ); }

    And here is the error message I'm getting right now:

    Fatal error: Cannot redeclare home_slider() (previously declared in /home/aviation/public_html/wp-content/themes/eleven40-pro/functions.php:154) in /home/aviation/public_html/wp-content/themes/eleven40-pro/functions.php on line 164

    June 25, 2014 at 9:59 pm #111575
    Brad Dalton
    Participant

    You cannot use the same function name

    home_slider


    Tutorials for StudioPress Themes.

    June 26, 2014 at 5:26 am #111611
    tproud
    Member

    I have replaced the second one with home_slider2 and it works now. Thank you.

    June 26, 2014 at 5:43 am #111616
    Brad Dalton
    Participant

    Cool!


    Tutorials for StudioPress Themes.

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