I’ve tried to cobble a few pieces together from other threads, but it’s not working.
I want the option to use the default slider on the site. I simply want to replace the default slider on the home page with a smart slider2.
When I place the following shortcode into pagebuilder on the home page, it works fine, but the site wrapper prevents it from displaying full width. [smartslider2 slider=”5″]
I’ve created a child theme and replaced header.php code: ?php vantage_render_slider() ?>
With: ? php if(is_front_page()) echo do_shortcode(“[smartslider2 slider=”5″]”); ?>
Getting an error: Parse error: syntax error, unexpected ‘5’ (T_LNUMBER) in /home/content/p3nexnas03/84/2059784/html/wp-content/themes/vantage/header.php on line 34
Hi Brian
It looks like you’re missing the opening of the PHP tag, you’ll also need a different set of containing inverted commas, please try the below:
php if(is_front_page()) echo do_shortcode('[smartslider2 slider="5"]'); ?>
I think that will work. I’ve got some spacing issues below the slider, but should be able to figure them out.
Thanks so much!
No worries.
Sometimes you can sort out the spacing below the slider by using a negative margin on #main like this: