Skip to content

Instantly share code, notes, and snippets.

@chillybin
Created August 29, 2014 06:16
Show Gist options
  • Save chillybin/8b8a23873822591ce07a to your computer and use it in GitHub Desktop.
Save chillybin/8b8a23873822591ce07a to your computer and use it in GitHub Desktop.
<?php
// pulled from https://github.com/billerickson/BE-Genesis-Child
// reposition inpost metabox
remove_action( 'admin_menu', 'genesis_add_inpost_layout_box' );
add_action( 'admin_menu', 'be_add_inpost_layout_box' );
function be_add_inpost_layout_box() {
if ( ! current_theme_supports( 'genesis-inpost-layouts' ) )
return;
foreach ( (array) get_post_types( array( 'public' => true ) ) as $type ) {
if ( post_type_supports( $type, 'genesis-layouts' ) )
add_meta_box( 'genesis_inpost_layout_box', __( 'Layout Settings', 'genesis' ), 'genesis_inpost_layout_box', $type, 'normal', 'default' );
}
}
// Reposition inpost SEO metabox
remove_action( 'admin_menu', 'genesis_add_inpost_seo_box' );
add_action( 'admin_menu', 'be_add_inpost_seo_box' );
function be_add_inpost_seo_box() {
if ( genesis_detect_seo_plugins() )
return;
foreach ( (array) get_post_types( array( 'public' => true ) ) as $type ) {
if ( post_type_supports( $type, 'genesis-seo' ) )
add_meta_box( 'genesis_inpost_seo_box', __( 'Theme SEO Settings', 'genesis' ), 'genesis_inpost_seo_box', $type, 'normal', 'default' );
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment