Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1166865

    Hello
    In my web site, some users have access to the blog (multi author), and can publish articles.
    However I had simplified the back office for them, by removing the layout boxes, yoast box, etc … like this:

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

    Now that I have updated the theme and wordpress core, this code no longer seems to work.
    Do you have a tip?
    Thank you in advance !

    #1166866
    This reply has been marked as private.
    #1166878

    Ok, forget, I’ve found :

    function my_remove_meta_boxes2() {
      isSiteAdmin();
      if( !isSiteAdmin() ){
        remove_meta_box( 'layout', 'post', 'side' );
        remove_meta_box( 'wpseo_meta', 'post', 'normal' );
      }
    }
    add_action( 'add_meta_boxes', 'my_remove_meta_boxes2', 11);

    Thanks

    #1166969

    Hi,

    I’m glad you resolved this. If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Simplify post screen’ is closed to new replies.