Community Forums › Forums › Archived Forums › General Discussion › Soliloquy slider
Tagged: Soliloquy Slider
- This topic has 9 replies, 2 voices, and was last updated 11 years, 5 months ago by Loudness.
-
AuthorPosts
-
May 22, 2013 at 9:49 pm #42288LoudnessMember
Hi ! Let's say I want to add the soliloquy slider to the streamline theme right after the "header" section (between the header & menu. How can I do that ? Got this code from soliloquy :
function soliloquy_slider_header_home() { if (is_home()) { echo do_shortcode('[soliloquy id="88"]'); } }; add_action('genesis_header', 'soliloquy_slider_header_home');
But where I'm supposed to paste this code ? there is no header.php file in the child theme folder ? Sorry I'm a newb...
Or is there a simple way to do it ? By a widget or something ? I want the slider to take the full width
Thanks
May 22, 2013 at 10:09 pm #42293LoudnessMembercorrection : I want the slider between the menu & main content section.
May 23, 2013 at 12:29 am #42296Brad DaltonParticipantCopy this code from the view raw link and paste the code at the end of your child themes functions.php file using a text editor like Notepad++.
Here's the code for after the header if you want to change position.
You'll need to replace the 88 with the i.d for your slider which is generated after you add a new slider.
The width for your slider images should be set to 960px
The code includes a conditional tag so the slider will only display on the home page.
July 7, 2013 at 9:48 pm #49744LoudnessMemberHi
for any reasons, this code add the slider on all the pages ? Any idea why ?
July 8, 2013 at 12:09 am #49759Brad DaltonParticipantAre you using a static page as your home page?
If so, change the conditional tag from:
if (is_home()) {
To
if (is_front_page() ) {
July 10, 2013 at 1:44 pm #50130LoudnessMemberHi Brad
thanks for all your help. The slider is on all the page, except the home page... ( I want the opposite) here's the code I'm using :
function soliloquy_slider_header_home() {
if (is_front_page() ) {
echo do_shortcode('[soliloquy id="4402"]');
}
};
/**
* @author Brad Dalton - WP Sites
*
* @example http://wp.me/p1lTu0-9Th
*/
add_action('genesis_header', 'soliloquy_slider_header_home');/** Add soliloquy after header Genesis */
function wpsitesdotnet_soliloquy_slider_header() {if ( function_exists( 'soliloquy_slider' ) ) soliloquy_slider( '4402' );
};
/**
* @author Brad Dalton - WP Sites
*
* @tutorial http://wp.me/p1lTu0-9Th
*/
add_action('genesis_after_header', 'wpsitesdotnet_soliloquy_slider_header');/** Change header height */
add_theme_support( 'genesis-custom-header', array( 'width' => 960, 'height' => 180 ) );Resumé : ! want the soliloquy slider on the home page only, after the header, & slider height must be 180px. What is wrong in the code ?
July 11, 2013 at 11:35 am #50265Brad DaltonParticipantPlease link to your site.
Simple change the hook from:
add_action('genesis_header', 'soliloquy_slider_header_home');
To
add_action('genesis_after_header', 'soliloquy_slider_header_home');
You may also need the conditional tag from:
if (is_front_page() ) {
To
if (is_home() ) {
August 2, 2013 at 8:12 am #53728LoudnessMemberOk after all these change I was able to have the slider only on the homepage, but position of the slider is wrong. I want it to be between the menu & the main content.
see : http://www.graphical-media.com/abat2013 (beta site)
Code I'm using :`/** Change header height */
add_theme_support( 'genesis-custom-header', array( 'width' => 960, 'height' => 180 ) );// ADD SOLILOQUY SLIDER**//
function soliloquy_slider_header_home() {
if (is_front_page() ) {
echo do_shortcode('[soliloquy id="4402"]');
}
};
add_action('genesis_header', 'soliloquy_slider_header_home');function wpsitesdotnet_soliloquy_slider_header() {if ( function_exists( 'soliloquy_slider' ) ) soliloquy_slider( '4402' );};`
Any idea how to solve that ?
August 2, 2013 at 8:27 am #53734Brad DaltonParticipantAugust 2, 2013 at 8:40 am #53740LoudnessMemberWorked ! Thanks !
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.