Putting footer content in a “page” – Doing it wrong?

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?

1 Answer
1

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.

Leave a Comment