I'm currently using WordPress for a website and it will simply be acting as a CMS rather than a blogging platform. This means that WordPress' 'posts' are not needed. Is there anyway of disabling them by adding some code to functions.php?

It would be acceptable to just remove the 'posts' option from wp-admin.

  • 1
    Simply stop using posts and hide the posts menu? You could use something similar to what i did here.
    – t31os
    Jul 30, 2011 at 9:45

3 Answers 3


Posts are a broader category than they initially appear to be. The post is any content, even if you're using WP as a CMS. While it might seem like a post is a blog post, really it's anything you post on the site. Disabling it will kill all content. Better to turn off the various bloggy components, such as comments, and then edit the template files to remove references to the author, date posted, etc, to achieve a CMS site.

  • 3
    This is true from the database perspective, ie everything is stored in the *_posts. However, the API makes a distinction in the form of the post_type. Perhaps a clearer way to ask the question would have been "How do I disable the 'post' post type". Don't know the exact solution but I don't think you can "unregister" it. Your best bet would be to find the hook to disable the default query created for the Loop.
    – Hari Honor
    Jun 6, 2012 at 11:53

I don't know if I'm covering everywhere the post functionality is linked from, but adding the following code to functions.php should at least remove the comments links from the administration menu, the toolbar, and the dashboard:

add_action( 'admin_menu', 'remove_admin_menus' );
add_action( 'wp_before_admin_bar_render', 'remove_toolbar_menus' );
add_action( 'wp_dashboard_setup', 'remove_dashboard_widgets' );

function remove_admin_menus() {
    remove_menu_page( 'edit.php' );

function remove_toolbar_menus() {
    global $wp_admin_bar;
    $wp_admin_bar->remove_menu( 'new-post' );

function remove_dashboard_widgets() {
    global $wp_meta_boxes;

The only links I can see that are remaining are in the "Right Now" metabox on the dashboard; you can also remove this entire box by adding the following code into the remove_dashboard_widgets function:

  • 3
    Never unset core vars, if WP change the core var name e.g. from $wp_meta_boxes to $wp_metaboxes, your code won't work anymore. Use remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );
    – Ralf912
    May 3, 2013 at 1:00

Use this Hide admin panels plugin to hide panels.

  • hiding is not disabling
    – user2015
    Oct 15, 2015 at 3:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.