• Resolved inula

    (@janetb)


    Hi,

    I would like to use thumbnail on archive-page and used this code:

    add_filter( 'generate_page_header_default_size', function() {
        return 'thumbnail';
    } );

    But now the thumbnail is above content on content-single too. (duh, of course…it’s the page header!)
    But what can I do to prevent that.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author Tom

    (@edge22)

    Give this a shot:

    add_filter( 'generate_page_header_default_size', function( $size ) {
        if ( is_archive() || is_home() ) {
            return 'thumbnail';
        }
    
        return $size;
    } );

    Let me know ??

    Thread Starter inula

    (@janetb)

    Thanks Tom!
    Perfect.

    Theme Author Tom

    (@edge22)

    You’re welcome ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Thumbnail on archive’ is closed to new replies.