Community Forums › Forums › Archived Forums › Design Tips and Tricks › Is it possible to add a slider below the header in eleven40-Pro?
Tagged: Eleven40-Pro, slider
- This topic has 11 replies, 2 voices, and was last updated 9 years, 5 months ago by
Brad Dalton.
-
AuthorPosts
-
June 24, 2014 at 7:43 am #111286
tproud
MemberHi, 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 #111290Brad Dalton
ParticipantYou 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/
June 24, 2014 at 1:47 pm #111340tproud
MemberThanks, 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 #111386Brad Dalton
ParticipantThe Genesis slider includes one widget so it can only be used once unless you want to display the same slider in different positions/pages.
June 25, 2014 at 5:47 am #111437tproud
MemberHi 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 #111440tproud
MemberOkay, 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 #111442tproud
MemberI 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 #111456Brad Dalton
ParticipantWhat was the error message?
You can't use the same function name for anything in WordPress, they must be unique.
June 25, 2014 at 1:25 pm #111520tproud
MemberI 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 #111575Brad Dalton
ParticipantJune 26, 2014 at 5:26 am #111611tproud
MemberI have replaced the second one with home_slider2 and it works now. Thank you.
June 26, 2014 at 5:43 am #111616Brad Dalton
Participant -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.