• Resolved Matthew Pollard

    (@matthewpolld)


    Hello,

    My ‘home’ page is being used by the events manager plugin to display a list of events. So I don’t want a user to try and add text to this page, by clicking ‘edit’ page. How can I either hide this page from the ‘all pages’ list or disable it in some way. I still want the page, as it’s needed for the plugin.

    Thank-you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey there,

    I found a couple of plugins that might help. The first one is free but doesn’t really stop people from adding/editing text content. The 2nd one does exactly what you need but is $19 one time fee. Dont be confused that it says lock posts as it DOES lock pages as well (just tested it) Hopefully, one of these will work for what you need:

    https://www.ads-software.com/plugins/lock-pages/

    https://premium.wpmudev.org/project/lock-posts/

    Thread Starter Matthew Pollard

    (@matthewpolld)

    Thank-you. I didn’t really want to use another plugin for my site. I used this :

    add_filter( 'parse_query', 'exclude_pages_from_admin' );
    function exclude_pages_from_admin($query) {
        global $pagenow,$post_type;
        if (is_admin() && $pagenow=='edit.php' && $post_type =='page') {
            $query->query_vars['post__not_in'] = array('28');
        }
    }

    Very cool! I am by no means a coder so this is over my head so I really appreciate plugins LOL Glad you were able to find the right code ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to hide a page from the all pages list in dashboard’ is closed to new replies.