Slider Revolution Featured Slider Add-On Implementation Question

Posted in: Newspaper
Post count: 1

Hello,
I want to replace the Featured Image with a Revolution Slider. There is a method to replace it at https://www.themepunch.com/revslider-doc/add-on-featured-slider/ utilizing the following sample code:


$total_image = wp_get_attachment_image_src( get_post_thumbnail_id() , 'total-blog-header' );
echo do_shortcode('[featured_revslider]'.esc_attr( get_the_title() ).'[/featured_revslider]');

Your code doesn’t quite match up since it doesn’t use $total_image but rather it uses:
echo $td_mod_single->get_image('td_696x0');

How can I update the loop-single.php code to incorporate the slider? I have tried the following to no avail.

// override the default featured image by the templates (single.php and home.php/index.php - blog loop)
if (!empty(td_global::$load_featured_img_from_template)) {
echo $td_mod_single->get_image(td_global::$load_featured_img_from_template);

} else {

//BEGIN SLIDER REVOLUTION FEATURED IMAGE REPLACEMENT END
if (empty($total_image[0])) {
echo $td_mod_single->get_image('td_696x0');
} else {
echo do_shortcode('[featured_revslider]'.esc_attr( get_the_title() ).'[/featured_revslider]');
}

//END SLIDER REVOLUTION FEATURED IMAGE REPLACEMENT
// echo $td_mod_single->get_image('td_696x0'); //ORIGINAL CODE IN THIS BLOCK
}

Post count: 20688

Hi,

We have not tested this slider add-on with the theme, please note that the theme functionality may not be compatible with such a slider for the featured image inside the post page. As it can be seen in the post template files the theme has a different featured image implementation, it may not be easy to do something like this, or even possible.

Thanks

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