Community Forums › Forums › Archived Forums › Design Tips and Tricks › Atmosphere Pro Front Page 1 MetaSlider CSS Position
Tagged: Atmosphere Pro, Soliloquy Slider
- This topic has 11 replies, 2 voices, and was last updated 5 years ago by
Bobert.
-
AuthorPosts
-
May 20, 2018 at 10:50 am #220101
Bobert
ParticipantHello,
Can anyone please help me with this problem? THANKS!The following is a support question I submitted to StudioPress. (There response is below)
Home Page issue question. I need a slideshow on the home page. Nested to the very top, just below the logo & Header menus.
As you can see I deleted the default main image, which just left a flat blackish 1600x1050 image, I expected white. So I added a 1600x1050 white .png. Then added a test Metaslider in the Front Page 1 Widget area. Just 2 slides at 1200x705, but as you can see it doesn't go from edge to edge (which I want) & it's not nested to the top (which I want), just below the menus.
So, Please... how can I achieve the result I'm looking for concerning the slider placement?
Thank you!
Bob
___________________________________________________________
SP Response:You can definitely customize the site that way - unfortunately, I don't have copy/paste code, as it needs to be written and tested specifically for your site.
You can use in-browser Inspection tools to determine the proper selector to target, and to make live changes until you have this customization just right:
All of these design changes are done with css in the style.css file.
You can also ask on the Community Forums, to see if another user has done something similar and can share the code: http://studiopress.community
If you wish to have someone assist you with the work, we have Approved Designers - just visit http://www.studiopress.com/genesis-developers for a list.
http://new.marydowlings.com/May 20, 2018 at 11:02 am #220102Brad Dalton
ParticipantYou could hook in a slider like soliloquy using the genesis_after_header hook.
May 20, 2018 at 11:30 am #220103Bobert
ParticipantThat Worked!! Thank you so much! I'm using MetaSlider... I guess it doesn't seem to matter which slider your using. Though if you know of a good reason I should change, please share.
Thanks Again!
BobMay 20, 2018 at 11:36 am #220104Bobert
ParticipantHi again... it's on every page & should only be on the home page. Did I do something wrong with the hook?
Thanks!
BobMay 20, 2018 at 11:58 am #220105Brad Dalton
ParticipantYou can add the code to the front page template
or
You can add a conditional tag to the code.
See the last code snippet on this page
May 21, 2018 at 11:04 am #220123Bobert
ParticipantThanks, but it's still not working...
I added this to
Atmosphere Pro: Theme Functions (functions.php)add_filter( 'genesis_after_header', 'add_slider' );
function add_slider() {
if ( ! is_front_page() ) {
return;
}if ( function_exists( 'metaslider' ) ) {
metaslider( 'slider', 'slug' );
}
}
The short code is in the simple hooks as after header.
And the Front Page 1 Widget has nothing in it.
But the slider is still on every page.
What am I doing wrong? Here's the home page link: http://new.marydowlings.com/
Thanks!
BobMay 21, 2018 at 11:07 am #220124Brad Dalton
ParticipantRemove the shortcode from simple hooks because its not wrapped in a conditional.
Add the code to functions.php
May 21, 2018 at 11:40 am #220127Bobert
ParticipantNow nothing appears & I think I know why.
The slider I made using MetaSlider I did name "slider".
But it says this:
How to Use
To display your slideshow, add the following shortcode (in orange) to your page. If adding the slideshow to your theme files, additionally include the surrounding PHP function (in gray).
<?php echo do_shortcode('
[metaslider id="384"]
'); ?>I tried adding it in a few places, but it doesn't work. Is this the problem & if so, do you know how I can fix it? Thanks Again! Bob
May 21, 2018 at 1:56 pm #220134Brad Dalton
ParticipantSwap out the function call
if ( function_exists( 'metaslider' ) ) { metaslider( 'slider', 'slug' ); }
To this :
echo do_shortcode('[metaslider id="384"]');
May 21, 2018 at 2:29 pm #220137Bobert
ParticipantBrad,
That worked great!!! It's not on the other pages! I have do have to bypass the front page widgets & use WP Text Editor. That should not be a problem on the home page. If I use the Front Page 2 Widget, the text appears way to far down on the page... Any thoughts? Though it's an issue.Thanks for everything!!!
BobMay 21, 2018 at 2:45 pm #220138Brad Dalton
ParticipantSomething like this in functions.php :
add_action( 'genesis_after_header', 'add_slider' ); function add_slider() { if ( ! is_front_page() ) { return; } echo do_shortcode('[metaslider id="384"]'); }
Or this in your front-page.php template :
add_action( 'genesis_after_header', 'add_slider' ); function add_slider() { echo do_shortcode('[metaslider id="384"]'); }
May 21, 2018 at 3:01 pm #220141Bobert
ParticipantIt seems that your solution, also fixed the front page 2 widget issue & how/where it appears as well as if I leave front page 2 widget out... the WP text editor works.
But it's great to have options!
Again... Thank You So Much!!! You Made My Day!!!!!
Bob 🙂
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.