I am developing a page in WordPress. In functions.php file I have this:
function feed_add_notmusa() {
add_feed('mypage', 'mypage_function');
}
function mypage_function() {
get_template_part('/mypage');
}
But how can I restrict access to /mypage so only logged in users can access?
Could you please help me?