Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1350958

    Hi,
    i need to add two custom post types (CPT UI) and therefore i need to make ALB work.

    I found this advice:

    The second one recommended from @Rikard leads to a fatal error.

    The first one does not really work:
    I see the normal WP-Editor on top.
    Below i see the ALB but the ALB never stops loading (Spinning wheel of death).

    This is the code i used for the “half working” solution:

    function avf_alb_supported_post_types_mod( array $supported_post_types )
    {
    $supported_post_types[] = array('angebot', 'kurs');
    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[] = array('angebot', 'kurs');
     return $supported_post_types;
    }
    add_filter('avf_metabox_layout_post_types', 'avf_metabox_layout_post_types_mod', 10, 1);

    How to make that going?
    kind regards
    Elvira

    #1350962

    It would be nice if there wouldnt be so many uncommented threads which lead in the wrong direction.
    It takes hours until you find the correct answer – if.

    close thread, please!

    Correct answer:

    function avf_alb_supported_post_types_mod( array $supported_post_types )
    {
      $supported_post_types[] = 'YOUR CUSTOM POST NAME';
      $supported_post_types[] = 'YOUR CUSTOM POST NAME';
      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[] = 'YOUR CUSTOM POST TYPE';
     $supported_post_types[] = 'YOUR CUSTOM POST TYPE';
     return $supported_post_types;
    }
    add_filter('avf_metabox_layout_post_types', 'avf_metabox_layout_post_types_mod', 10, 1);
    #1350994

    Hi,

    Glad to know that you have found a working solution. Please feel free to open another thread if you have more questions regarding the theme.

    Have a nice day.

    Best regards,
    Ismael

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Avia layout builder with a few custom post types’ is closed to new replies.