Tagged: ,

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

    Hi,

    I’m trying to find a way to remove the Layout meta box on post edit pages (for non admin users). There is a solution in this thread but it doesn’t seem to work with the latest version.

    Any ideas ?

    • This topic was modified 7 years, 11 months ago by mike235. Reason: spelling
    #732433

    Hey mike235,

    Thank you for using Enfold.

    Edit the post then click the Screen Options located at the top right corner of the dashboard. Disable the “Layout” metabox there.

    Best regards,
    Ismael

    #732588

    Hi Ismael,

    I mean remove completely, not hide. The code you suggested in the thread I link to doesn’t seem to work anymore.

    Thanks,
    Mike

    #733922

    Hi,

    Alright. Please replace the code in the functions.php file with the following.

    // disable layout metabox for post
    add_filter('avf_builder_boxes', 'avf_builder_boxes_mod');
    function avf_builder_boxes_mod($metabox)
    {
    	foreach($metabox as &$meta)
    	{
    		if($meta['id'] == 'layout')
    		{
    			$meta['page'] = array('page', 'portfolio');
    		}
    	}
    	return $metabox;
    }

    Best regards,
    Ismael

    #734646

    Great, thanks a lot Ismael !

    #735090

    Hi,

    Glad we could help :-)

    Please let us know if you should need any further help on the topic.

    Best regards,
    Rikardx

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.