Hello Candra,
I haven’t tested this code but I think it will work. First you should create a child theme (see https://github.com/jayj/Cakifo/wiki/Child-themes) and put this code in the child theme functions.php:
add_action( 'after_setup_theme', 'my_child_setup', 11 );
function my_child_setup() {
/* Get the parent theme prefix. */
$prefix = hybrid_get_prefix();
/* Filter Get the Image arguments */
add_filter( 'get_the_image_args', 'my_child_hide_thumbnail' );
/* Other Actions and filters calls go here. */
}
function my_child_hide_thumbnail( $args ) {
if ( ! cakifo_is_active_slider() ) {
return false;
}
return $args;
}
Hope that helps. If it does not work, please write again.
– Jesper
I’am trying on localhost but not working.
But this child theme work for Cakifo 1.5
Sorry! This should work:
add_action( 'after_setup_theme', 'my_child_setup', 11 );
function my_child_setup() {
/* Get the parent theme prefix. */
$prefix = hybrid_get_prefix();
/* Filter Get the Image output */
add_filter( 'get_the_image', 'my_child_hide_thumbnail' );
/* Other Actions and filters calls go here. */
}
function my_child_hide_thumbnail( $output ) {
if ( ! cakifo_is_active_slider() ) {
return false;
}
return $output;
}
It’s working, thank you.. 🙂
Fantastic! You’re welcome 🙂