Hey guys,
I understand that I can activate Page Builder into a custom post type, like WP Courseware Units for exemple. But, how to I find the custom post name to insert into this code :
add_filter('avf_builder_boxes', 'add_builder_to_posttype');
function add_builder_to_posttype($metabox)
{
foreach($metabox as &$meta)
{
if($meta['id'] == 'avia_builder' || $meta['id'] == 'layout')
{
$meta['page'][] = 'post'; /*instead add the name of the custom post type here*/
}
}
return $metabox;
}
Hey Phet,
On this line:
$meta['page'][] = 'post'; /*instead add the name of the custom post type here*/
Did you try replacing page with the name of the custom post type?
Best regards,
Rikard
Hey Rikard,
That’s the thing… I know I got to replace it, but I don’t know the name of the custom post type… Is there an easy way I can find that out?
Thanks,
PM
Hi,
If you select to edit a post using that post type, you might be able to see that in the URL? If not then I would have to refer to you to the developers of WP Courseware Units (I have no clue what it actually is).
Best regards,
Rikard
Thanks Rikard. For anyone looking for this info: ‘course_unit’ .
We can close this one.