Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #919773

    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;
    }
    #920085

    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

    #920086

    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

    #920158

    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

    • This reply was modified 6 years, 8 months ago by Rikard.
    #921246

    Thanks Rikard. For anyone looking for this info: ‘course_unit’ .

    We can close this one.

    #921321

    Hi Phet,

    Great, glad you found the name and thanks for sharing. Please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Activating Page Builder into WP Courseware units’ is closed to new replies.