lundi 1 décembre 2014

Stop Custom post type from being searched via URL


I am developing a website in WordPress and I have used a custom post type for people to use. The custom post type only shows if the user is logged in and is the author of it, this shows on the profile page and nowhere else.


What I want to do is stop people being able to search for it in the address bar, for example..


http://ift.tt/1rMiTSH - This will show the single version of this post, however I need it to redirect to the login page.


http://ift.tt/12cXlIV - This shows an archive page of the custom post type, however I need this to redirect to the login page. I have solved this temporaroly with a 301 redirect, however if you have any other advice, I would appreciate it.


Any help would be great!





Aucun commentaire:

Enregistrer un commentaire