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
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);