Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1344968

    Hello we have created a new custom post type (proyectos_ma) and we would like to use the Avia Layout Builder in this type of new content to build the pages.
    How can we do it?

    Thanks.

    #1344978

    can you please test this in your child-theme functions.php:

    function avf_alb_supported_post_types_mod( array $supported_post_types ) {
      $supported_post_types[] = 'proyectos_ma';
      return $supported_post_types;
    }
    add_filter('avf_alb_supported_post_types', 'avf_alb_supported_post_types_mod', 10, 1);
    
    function avf_metabox_layout_post_types_mod( array $supported_post_types ) {
      $supported_post_types[] = 'proyectos_ma';
      return $supported_post_types;
    }
    add_filter('avf_metabox_layout_post_types', 'avf_metabox_layout_post_types_mod', 10, 1);
    #1344982

    PS: if you like to include your CPT to search results use:

    function include_cpt_search( $query ) {
        if ( $query->is_search ) {
        $query->set( 'post_type', array( 'post', 'page', 'proyectos_ma' ) );
        }  
        return $query;
    }
    add_filter( 'pre_get_posts', 'include_cpt_search' ); 
    #1344984

    Hi,

    Thanks for helping out @guenni007 :-)

    Best regards,
    Rikard

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