• Skip to primary navigation
  • Skip to main content
  • Skip to footer

altaneus

Pensées pour moi-même...

  • Home
  • Snippets
  • About

Remove Post Metaboxes

Publié le 20 January 2019 par Stefano / Dernière modification le 28 January 2019

<?php

function dottaware_remove_post_metaboxes() {
    
    $args = array(
        'public'   => true,
    );
    
    foreach ( get_post_types( $args, 'names' ) as $post_type ) {
        remove_meta_box( 'postcustom', $post_type, 'normal' ); // Custom fields.
        remove_meta_box( 'trackbacksdiv', $post_type, 'normal' ); // Trackbacks.
        remove_meta_box( 'commentstatusdiv', $post_type, 'normal' ); // Comments status.
        remove_meta_box( 'commentsdiv', $post_type, 'normal' ); // Comments.
        
        remove_meta_box( 'genesis_inpost_seo_box', $post_type, 'normal' ); // Genesis SEO.
        remove_meta_box( 'genesis_inpost_layout_box', $post_type, 'normal' ); // Genesis Layout.
        remove_meta_box( 'genesis_inpost_scripts_box', $post_type, 'normal' ); // Genesis Scripts.
    }
}
add_filter( 'add_meta_boxes', 'dottaware_remove_post_metaboxes', 99 );

// alternative method.
// add_action( 'admin_menu', 'dottaware_remove_post_metaboxes', 99 );

Footer

Recent Posts

  • Jetpack Stats – il va falloir payer
  • Jetpack Personal : augmentation de prix
  • Générateurs de mots de passes
  • Générateur de GUID/UUID
  • Appareil photo du Samsung S22 Ultra

Categories

  • Apache
  • Cloudflare
  • DNS
  • Genesis
  • Infomaniak
  • Jetpack
  • Non classé
  • Outils
  • Photographie
  • Sécurité
  • Uncategorized
  • Wordpress
  • WP Rocket

Copyright © 2025 · Genesis Framework · WordPress · Log in