Add RevSlider to homepage?

Posted in: Newspaper
Post count: 21

Hi,

I want to add revolution slider to homepage – on this site tryhealthier.com – I want it above the content and bellow the header menu (like it is on this site http://www.universalprinciples1.com/)

But, if I try to edit the page, at Rev. Slider Options -> Choose Slide Template -> It only shows Default. It doesn’t show any of the created sliders.

Please help.

Thank you.

Post count: 21

Rev Slider says there is an option to add this php code… but I dont know where…

<?php
if(is_home() || is_front_page()){
echo do_shortcode(‘[rev_slider alias=”slider1″]’);
}
?>

Post count: 22421

Hello,

If you need info on how to use the plugin please consult their official documentation. https://www.themepunch.com/revslider-doc/slider-revolution-documentation/

the code you mention will render a slide on the homepage but you can easily add the revolution slider element in visual composer and place it where you want on that page.

Thank you!

Post count: 21

Bogdan,

I do not want the slider on the page. I just want it in the header, and to be displayed only on homepage. How do I do that? Most themes have a setting when publishing a page – at the bottom – you can add a slider to the header of the page.

I know how to use the Slider, I dont know how to add it to Newspaper 7 – there is an option that says Slider but only displayes “Default.” It wont show any of the created sliders.

On http://www.universalprinciples1.com/ – I was able to implement it – kindly check it out to see how I want it.

Regards,
Vlad

Post count: 22421

Hi,

I understand.
In that case the exact code you posted above will do the trick. Just add it to the header style that you use. Here is an example for header style 1: https://www.screencast.com/t/FmsPYM2WW

You will have to change the shortcode though from this: [rev_slider alias=”slider1″] to your opwn slider shortcode.

Thank you!

Post count: 21

Hi Bogdand,

Thanks for helping me 🙂

Problem is…I just dont get it.

So I did this:

Went to cpanel – file manager, edited header style 1. added this code right at the end.

<?php
if(is_home() || is_front_page()){
echo do_shortcode(‘[rev_slider alias=”fullsite-block-1″]’);
}
?>

saved.

Refreshed site – homepage is blank.

What am I doing wrong? This is so frustrating…

  • This reply was modified 9 years by cva183.
Post count: 21

Ok so I have managed to figure it out.

<?php
if(get_the_ID()==1735) {
echo do_shortcode(‘[rev_slider alias=”fullsite-block-1″]’);
}
?>

If I do it this way it seems to be working.

Viewing 7 posts - 1 through 7 (of 7 total)
The forum ‘Newspaper’ is closed to new topics and replies.