How to remove Categories & Tags meta boxes – accommodation type?

Free and Premium WordPress Plugins & Themes Forums WordPress Plugins Hotel Booking How to remove Categories & Tags meta boxes – accommodation type?

  • This topic has 1 reply, 2 voices, and was last updated 2 weeks, 1 day ago by Andre Flores.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1196220
    Matthew Durrant
    Participant

    Hi,

    To remove the reviews meta box in the accommodation post type, I add the following code to my functions.php. I want to remove ‘Categories’ & ‘Tags’ from the editor, as they both aren’t used on my site – how can I do this, please? I can’t find where the categories & tags meta boxes are added? 

    function plt_hide_motopress_hotel_booking_lite_metaboxes() {
    $screen = get_current_screen();
    if ( !$screen ) {
    return;
    }
    
    remove_meta_box('reviews', $screen->id, 'side');
    
    }
    
    add_action('add_meta_boxes', 'plt_hide_motopress_hotel_booking_lite_metaboxes', 20);
    #1198556
    Andre Flores
    Moderator

    Hello Matthew,

    The meta in the reviews is loaded from default WordPress comments functionality. The easiest way to get rid of it is hiding it via custom CSS:

    .mphb_sc_accommodation_reviews-wrapper .comment-meta {
    	display: none;
    }

    Regards,
    Andre

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