Add styles to wordpress admin on the Page List

If you want to go with PHP solution, then the post_class filter hook (codex) would allow you to do that – see the example below. You can paste that to your functions.php.

Just be aware that hiding the post from posts list doesn’t make it restricted from access, users can still use the post’s edit url directly to access the edit screen or use the link in the top admin bar.

function set_admin_post_class( $classes, $class, $post_id ) {

    // affect post classes only in dashboard context
    if ( ! is_admin() ) {
         return $classes;
    }

    // Figure out where in dashboard we actually are
    // This will return early if we are not currently editing "pages"
    $screen = get_current_screen();
    if ( empty( $screen->post_type ) || 'page' !== $screen->post_type || 'edit' !== $screen->base ) {
        return $classes;
    }

    // Now let's get list of all items from admin menu
    global $menu;
    // $menu is an array of arrays, label comes always first in every element
    $menu_labels = array_map( function( $item ) {
        return array_shift( $item );
    }, $menu );

    // Finally we can check if a post name is the same as any of menu item's label
    $post_title = get_the_title( $post_id );
    if ( in_array( get_the_title( $post_id ), $menu_labels ) ) {
        $classes[] = sanitize_title_with_dashes( $post_title ); // you can set whatever class you want instead of $post_title. i.e. 'hidden' or 'contact'. In my example we are setting the same class as post title.
    }

    return $classes;
}

add_filter( 'post_class', 'set_admin_post_class', 10, 3 );

deneme bonusu veren sitelerbahis siteleripulibet girişdeneme bonusutürkçe altyazılı pornocanlı bahis casinocanlı bahis casino siteleriOnwin Güncel Girişholiganbetholiganbet girişholiganbet güncel giriş