Viewing 3 posts - 1 through 3 (of 3 total)
-
AuthorPosts
-
May 8, 2022 at 6:57 pm #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
ElviraMay 8, 2022 at 8:17 pm #1350962It 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);May 9, 2022 at 6:47 am #1350994 -
AuthorPosts
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.
