Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

So, in my shortish WordPress development career, I've gotten in the habit of creating a "page" for the content in a footer, and adding different fields with the wpalchemy class. Everything with this approach seems to work fine, except for the fact that users can go to mysite.com/footer and see something I do not want them to see.

Should I somehow force this url to 404? or is there something fundamentally wrong with my approach?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

I don't think there's anything fundamentally wrong with your approach, I see it pretty often.

You could hook parse_request and 301 redirect any requests to footer to the front page. I wonder though how visitors would end up there in the first place, as long as you exclude it from the sitemap and don't link to it anywhere.

Or you could create a custom post type for this kind of content and make it not publicly query-able.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.