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

I have a page template that I want to be able to show in two different modes: a regular mode and a bare-bones mode, where there is no header, footer, sidebar, etc. My hope is that I can get this done using a parent-child url, like so:

Normal view: http://sample.com/mypage/

Barebones view: http://sample.com/mypage/clean/

I assume I will need to edit header.php as well as footer.php to check whether or not they should show up, but how do I figure out the parent-child relationship, or is there an easier way to get this done?

share|improve this question
up vote 1 down vote accepted

Add an endpoint to your post permalink, name it clean.

In your callback for template_redirect use a special header.php or none at all. Do not forget to call exit;; otherwise WordPress will load the default template files later.

share|improve this answer

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.