current_user_can Not Always Working Properly
Do not set header in a template file. Those are part of the HTTP request itself. About your problem: Add a template (whatever file you need – see “Template Hierarchy”). On top of it you include the default stuff like get_header(); and so on. For the restricted part, you use the following: if ( current_user_can( … Read more