Title: Best practice to hide elements from theme
Last modified: February 25, 2017

---

# Best practice to hide elements from theme

 *  [kiwair](https://wordpress.org/support/users/kiwair/)
 * (@kiwair)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/best-practice-to-hide-elements-from-theme/)
 * Hello,
 * I’m currently developing a wordpress theme based on the [underscores starter theme](http://underscores.me/).
   I need to hide many elements of the theme and I’m debating between hiding the
   element with CSS (`display:none`) or removing the function call directly in the.
   php template (removing `get_footer();` to hide the footer by example).
    Which
   one do you think would be considered best practice?
 * Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [9 years, 5 months ago](https://wordpress.org/support/topic/best-practice-to-hide-elements-from-theme/#post-8847696)
 * if you remove get_footer(), you’ll break your site as get_footer() loads footer.
   php, which calls wp_footer(), which does all sorts of useful stuff!
 * If there are footer elements you don’t want, edit footer.php and remove them.
    -  This reply was modified 9 years, 5 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/best-practice-to-hide-elements-from-theme/#post-8848488)
 * Steve is correct, but you can take what he suggests to an extreme by removing
   _everything_ from footer.php _except_ the wp_footer() call. If you go that far,
   just call wp_footer() from your main template and not load footer.php at all.
   Assuming that wp_footer() is indeed the only element actually needed.
 * footer.php often has closing tags like </body></html> and sometimes a closing
   </div> or two — don’t forget to include these on your main template if footer.
   php is not loaded.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Best practice to hide elements from theme’ is closed to new replies.

## Tags

 * [hiding](https://wordpress.org/support/topic-tag/hiding/)
 * [template](https://wordpress.org/support/topic-tag/template/)
 * [theme developement](https://wordpress.org/support/topic-tag/theme-developement/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 2 replies
 * 3 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [9 years, 5 months ago](https://wordpress.org/support/topic/best-practice-to-hide-elements-from-theme/#post-8848488)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
