- Create a child theme (if you don't already have one) of your current theme and activate it.
- Copy
footer.php
from the parent theme to the child theme and modify it to display only what you want. Make sure you leave the php code in there (do_action('%whatever%');
) and only remove the actual content that you want removed.
If you only want this only on certain pages, use WP conditionals like is_page(%page_id%)
, is_archive()
, is_author()
, etc... to load no content only on the pages where you want no footer and load the normal content of the footer on the rest of the pages.
This way your changes to footer.php
will not get overridden by any future updates of the parent theme.
Basically, not loading footer.php
is generally not a good idea, as most plugin and theme developers consider it a place where it's safe to hook a script as it usually gets loaded on all pages. However, If you decide to create a template and not load footer.php
in it, you should run all the actions that are run from the theme's footer.php
from your template. Also you should check for any tags that are closed in the theme's footer and copy those too, or you'll break the page.
get_footer(none);
orget_footer('none');
? The argument should be a string.