• Resolved Step Forbes

    (@code-monkey)


    How can I target TML pages at the wp-admin dashboard to hide them from Editors and below? I have been using page ids but this is annoying since I have to update the list for every site I make. Is there a generic way I can target and hide TML from the backend?

    Awesome plugin by the way. We’ve used it on 300+ WordPress sites 😉

    Many thanks,
    The Monkey

Viewing 1 replies (of 1 total)
  • Plugin Author Jeff Farthing

    (@jfarthing84)

    
    // Get TML pages
    $pages = get_posts( array(
    	'post_type'      => 'page',
    	'post_status'    => 'any',
    	'meta_key'       => '_tml_action',
    	'posts_per_page' => -1
    ) );
    
    // Get the page IDs
    $pages = wp_list_pluck( $pages, 'ID' );
    
Viewing 1 replies (of 1 total)

The topic ‘Hide pages on backend from normal users’ is closed to new replies.