Home / admin / Hide all slugs
  • How to Hide all slugs


    Adding this PHP code to the functions.php of your wordpress theme will hide the slugs from the post editor admin page.

    ( click code to copy )

    wordpress snippet : PHP

    function hide_all_slugs() {
    global $post;
    $hide_slugs = "<style type=\"text/css\"> #slugdiv, #edit-slug-box { display: none; }</style>";
    add_action( 'admin_head', 'hide_all_slugs'  );

    ( WordPress codex functions, hooks, in this snippet. )

    admin_head, add_action,
  • Michelle Theriault

    Not very secure if you *really* want to disable the ability for users to edit post slugs. 

    How could I prevent users from editing post slugs?