Make custom post type archive for administrator only
Simply I have made a custom post type named
ticket and have created an
archive-ticket.php file I want to make if the user that tries to visit the tickets archive page is not administrator redirect him/her to the home page.
I can make a simple solution like add something like this code in the file direct:
wp_redirect( home_url( '/' ) ); exit();
Buy i feel that this is not a profestional solution and feel that this is bad for seo.