[Resolved] Add featured image on custom post type

Home Forums Support [Resolved] Add featured image on custom post type

Home Forums Support Add featured image on custom post type

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1017399
    onalti

    Customizer> Layout> Blog. I turned it off for blog pages, and it was passive on special post types. Is there a filter for me to activate in special shipment types?

    #1017411
    David
    Staff
    Customer Support

    Hi there,

    you can use the Blog Options filter:

    https://docs.generatepress.com/article/option_generate_blog_settings/

    #1017422
    onalti

    Thank you. Can apply well for special shipment types.

    add_filter( ‘option_generate_blog_settings’, ‘lh_custom_search_results_page_settings’ );
    function lh_custom_search_results_page_settings( $options ) {
    if ( is_post_type_archive( ‘custom_category’ ) ) {
    $options[‘single_post_image’] = true;
    $options[‘single_post_image_position’] = ‘below-title’;

    }

    return $options;
    }

    #1017442
    onalti

    thank you. My problem is solved.

    #1017454
    David
    Staff
    Customer Support

    You’re welcome

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.