Hi, thank you for your response.
With the new version of Slider Revolution echo do_shotcode doesn’t work anymore. They have implemented the new add_revslider code template.
I have made some tests and I have found the only working function is this:
function add_home_slider(){
if ( is_singular('post') ) {
add_revslider('Home-opening-slider');
}
}
add_action('x_before_view_global__slider-below', 'add_home_slider');
And it displays revolution slider inside sigle posts. If I add the && is_home() the function stops working also for single posts and the revolution slider is not shown.
On the other hand, I have tried to use only is_home in this way:
function add_home_slider(){
if ( is_home() ) {
add_revslider('Home-opening-slider');
}
}
add_action('x_before_view_global__slider-below', 'add_home_slider');
And it works, displaying the rev slider inside the blog page. So, I assume the problem is the php operator &&.
So, I have tried another function:
function add_home_slider(){
if ( is_singular('post')) {
add_revslider('Home-opening-slider');
}
elseif (is_home()) {
add_revslider('Home-opening-slider');
}
}
add_action('x_before_view_global__slider-below', 'add_home_slider');
using elseif intead of && it works! I hope this could be useful for someone it has the same needs.
Thanks!