selectivly throw a 404 error
Ok so I am writing a small plugin for my site. I am using WordPress 3.0 with the Network option enabled.
I have 2 blogs, the main root directory blog (which is open to the public) and a private blog in a subdirectory. This plugin will be enabled on the private blog and should do the following:
1) If the user accesses a page or feed for the private blog it should check if the user is logged in to an account
2) If they are not logged into an account I want it to thow a 404 error.
ie WP is installed at http://www.domain.tld with an open, public main blog, this private blog exists at http://www.domain.tld/blog. If I try to goto http://www.domain.tld/helloworld (which does not exist) my main blog shows a 404 error page.
If possible what I am attempting to do is if you are not logged in you get this 404 error page, like this private blog dosen’t even exist.
How could I accomplish this?
- The topic ‘selectivly throw a 404 error’ is closed to new replies.