• Resolved Candra Wiguna

    (@candrawiguna)


    This theme almost perfect, but i don’t like the thumbnail on every single post. I know the thumbnail show up only if i set featured image, but i need to set featured image for slider.

    Anyone can solve my problem?? Thanks before.
    *Sorry for my english

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author Jesper Johansen (jayjdk)

    (@jayjdk)

    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

    Thread Starter Candra Wiguna

    (@candrawiguna)

    I’am trying on localhost but not working.
    But this child theme work for Cakifo 1.5

    Theme Author Jesper Johansen (jayjdk)

    (@jayjdk)

    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;
    }
    Thread Starter Candra Wiguna

    (@candrawiguna)

    It’s working, thank you.. ??

    Theme Author Jesper Johansen (jayjdk)

    (@jayjdk)

    Fantastic! You’re welcome ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Remove the thumbnail on top of my post in Cakifo theme’ is closed to new replies.