Show a custom template, no matter the page being viewed, if the user is not logged in
This turned out to be far easier than I had feared, using the template_include filter – /** * Override the standard WordPress template with the ‘please login’ template if the current user is not logged in */ add_filter(‘template_include’, ‘portfolio_page_template’, 99); function portfolio_page_template($template){ /** List the pages that are authorised for non-logged in users */ $authorised_pages … Read more