WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Some times, when we work on custom wordpress themes, we need required pages. For example - custom login page. Some times, when user change slug, page template or something else - it a very difficult to find. Or user can delete this page :) Also this can be problem, when you have custom links for this pages on another pages. I want to find solution for manage this. I can paste our code that we use for this.

share|improve this question
Please add comments not just down grade the question :) thanks! – NetWeight Company Apr 10 '14 at 2:51

Themes should not create content. Ever. That is plugin territory.

When you activate the plugin, search for pages with a special custom field. Its name should start with an underscore, so it doesn’t show up in the Custom Fields metabox, for example _pluginslug_required_page. If there are no such pages, create your own.

But I would question the underlying problem. Why do you need those pages? There are very few cases where that is really needed, a cart page in an e-commerce plugin maybe. A theme should work without such an requirement.

share|improve this answer
Hello @toscho! We are your fans! Thanks for your answer, I want to add more information to you! For example we have custom templates for custom pages like(here the slug of pages): "login", "registration", "forgot-password", "login-2", "registration-2". If well put a link to login page at registration page like code get_permalink('login') ` - If we remove this page - this link will be displayed, but not work fine(generate 404 error). Same things if i change the slug of the page. Another problem - if page will be deleted - we`ll not been notified in any ways(like errors, etc.) – NetWeight Company Jul 15 '14 at 18:55
can you tell me, how was created pages like cart, checkout at WooCommerce plugin? With custom post meta field? – NetWeight Company Jul 15 '14 at 19:07

Your Answer


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.