4

Is it possible to add a Page in WordPress, so that none of the header or the menus of the site appears on that page?

And also so that the stuff in sidebars that's on the rest of the site doesn't appear. And the stuff at the bottom of the page (there's a 'Leave a reply' form on the other pages.)

So on this site: http://richardclunan.com/ don't want any of the header handwriting or the 'hey there' / 'portfolio' / 'need copywriting' / 'etc' menu items to appear on one particular page, nor the side-bar sign-up box, nor the 'leave a reply' form. But I want all that stuff to appear on all other pages.

9

Create a custom Page Template, leave out the get_header(), get_footer(), and get_sidebar() calls in it, and put in your own html header/footer code in the Page template instead.

http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates

2

Rich - If you create an HTML page (however you wish) called something.html, and drop it in the same folder as the wordpress install, then http://richardclunan.com/something.html will show that page.

I had a blog made of static pages before flipping to WP. The old pages appear fine if fould on old bookmarks or search engines. http://joetaxpayer.com/gold is an example, get rid of the ending /gold and you see the WP site is there.

  • One big advantage of this method is that you cannot have other plugins of WordPress running on that page. You cannot organize that page as you organize other pages, too. – Ooker Aug 11 '16 at 17:28
1

you can create a new page template and associate it with that page.

on the page template, don't include the sidebar ( <?php get_sidebar(); ?>) and don't allow comments on that specific page, either by removing the call to the comment template, usually comments_template() or using the wp page admin.

the header and navigation is a bit more complicated but easily done by wrapping them in a conditional if( get_the_id() != '99' ) { ... } . Replace 99 with your page id surely.

-2

How to remove page elements by CSS

Open the inspector, and try to find the class or the id of the elements that you want to hide:

enter image description here

Then customize your CSS with :

body.page-id-2 h1.title {display:none;}

This way, you only hide the elements, not eliminate them. So that you don't break any potential function that requires to have the elements, e.g. page layout or scripts in footer.

Source: https://thethemefoundry.com/tutorials/hiding-parts-of-your-theme-with-displaynone/

  • While this approach provides a quick and dirty way to hide elements from view, you could also start to earn black marks from search engines for cloaking key content. – Andy Macaulay-Brook Aug 11 '16 at 20:26
  • is it much harmful? – Ooker Aug 11 '16 at 20:36
  • That's more a matter of opinion. Since a site header and to some extent the footer are likely to contain your main site wide keywords such as your branding and business proposition I'd think that in the context of this particular question it might be pretty harmful. – Andy Macaulay-Brook Aug 11 '16 at 20:44
  • but if so, then not calling the header and footer should have the same effect? Or even worse, because at least I have them in the page. Except I'm suspected to add malicious script... but this is just a CSS element. – Ooker Aug 11 '16 at 21:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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