Title: remove generate_before_header
Last modified: September 30, 2021

---

# remove generate_before_header

 *  [christopheran](https://wordpress.org/support/users/christopheran/)
 * (@christopheran)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/remove-generate_before_header/)
 * Hi,
 * I found this in the documentation:
 *     ```
       add_action( 'after_setup_theme','tu_remove_header' );
       function tu_remove_header() {
           remove_action( 'generate_header','generate_construct_header' );
       }
       ```
   
 * What I would like to do is remove – both – generate_header and generate_before_header.
 * I’ve tried several things that haven’t worked, can you show me how to do this?
 * Thanks,
 * Chris

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

 *  [Leo](https://wordpress.org/support/users/leohsiang/)
 * (@leohsiang)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/remove-generate_before_header/#post-14926055)
 * Hi Chris,
 * May I ask why you are trying to remove `generate_before_header`?
 * It’s simply a hook and shouldn’t interfere with anything.
 *  Thread Starter [christopheran](https://wordpress.org/support/users/christopheran/)
 * (@christopheran)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/remove-generate_before_header/#post-14926375)
 * Ah, okay, that helps already 🙂
 * I’ve been playing around with a couple of different ideas.
 * Right now, with a new install of Generator Press and a site I imported in, it’s
   displaying menu links – every link from every menu I had on the old site.
 * I wanted to remove those and when I commented out that line in header.php I got
   what I want 🙂
 * But based on your post, I figured maybe something was going awry. Further investigation
   found that my menus either didn’t import over to the new site, or I didn’t export/
   import them, so I guess Generate Press was just displaying every page I had.
 * I’ve set up a menu now and that issue is mostly fixed – though I would like to
   find out how to display the mobile style menu on desktop, rather than links across
   the top,
 * Chris
 *  Thread Starter [christopheran](https://wordpress.org/support/users/christopheran/)
 * (@christopheran)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/remove-generate_before_header/#post-14926421)
 * And found that info here:
 * [https://docs.generatepress.com/article/generate_mobile_menu_media_query/](https://docs.generatepress.com/article/generate_mobile_menu_media_query/)
 * Very cool, I’m really enjoying GP so far. Tried to find the simplest, fastest,
   theme that didn’t add a bunch of stuff I didn’t want 🙂 This fits the bill and
   has excellent documentation and support to boot 🙂
 * Chris
 *  [Leo](https://wordpress.org/support/users/leohsiang/)
 * (@leohsiang)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/remove-generate_before_header/#post-14926458)
 * Glad to hear 🙂

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

The topic ‘remove generate_before_header’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/generatepress/3.6.1/screenshot.
   png)
 * GeneratePress
 * [Support Threads](https://wordpress.org/support/theme/generatepress/)
 * [Active Topics](https://wordpress.org/support/theme/generatepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/generatepress/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/generatepress/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Leo](https://wordpress.org/support/users/leohsiang/)
 * Last activity: [4 years, 8 months ago](https://wordpress.org/support/topic/remove-generate_before_header/#post-14926458)
 * Status: not resolved