Show MapPress on specific page in admin?

Home Forums MapPress Support Show MapPress on specific page in admin?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #15322
    morktron
    Participant

    Hi, I’m just wondering if it is possible to show MapPress on a specific Page in admin instead of on all Pages?

    I hope you can help, thanks

    Mark

    #15323
    Chris
    Keymaster

    Hi, the settings screen lets you select specific post types for the map editor, but there’s no setting to only show the editor on a single page.

    I don’t know if it will work for you, but you can use the ‘screen options’ dropdown in the top-right of the WordPress post editor to disable the MapPress meta box when you’re not using it.

    #15324
    morktron
    Participant

    Thanks Chris for your swift reply! 🙂

    Ok no worries, I’ll tell the client that, thanks again, cheers

    Mark

    #15325
    Chris
    Keymaster

    If you literally want to show the map editor on only one page, you can do it with a little PHP in your functions.php file.

    You would need to use remove_meta_box()

    Something like this might work to remove the meta box from all pages except #1234 (I haven’t tested it):

    <?php 
    function remove_metabox() {
      global $post;
      if ($post->ID != 1234)
        	remove_meta_box( 'mappress' , 'page' , 'normal' ); 
    }
    add_action( 'admin_menu' , 'remove_metabox' );
    ?>
    #15326
    morktron
    Participant

    Aha excellent, I never knew about remove_metabox

    Thanks for code, I’ll give it a go 🙂

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