Title: remove function from hook &#8216;wp_head&#8217; does not work
Last modified: November 11, 2020

---

# remove function from hook ‘wp_head’ does not work

 *  Resolved [Christian Sabo](https://wordpress.org/support/users/pixelverbieger/)
 * (@pixelverbieger)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/remove-function-from-hook-wp_head-does-not-work/)
 * We are using Hueman 3.6.7 and a child theme.
 * I’d like to remove
 * – either the function ‘hu_print_gfont_head_link’ which is attached to the hook‘
   wp_head’ – `add_action( 'wp_head', 'hu_print_gfont_head_link', 2 );`
 * – or the stylesheet ‘hu-user-gfont’ from <HEAD>
    `<link id="hu-user-gfont" href
   ="//fonts.googleapis.com/css?family=…" rel="stylesheet" type="text/css">`
 * Every attempt I made in this failed.
    Neither `wp_dequeue_scripts` nor `remove_action`
   seem to do the job, no matter if I hook them to `wp_head` or `wp_enqueue_scripts`
   or `wp_print_styles`.
 * Can you help me?
 * Or maybe is this the only method that works?
 *     ```
       function hu_print_gfont_head_link() {
         // do nothing;
       }
       ```
   

Viewing 1 replies (of 1 total)

 *  Thread Starter [Christian Sabo](https://wordpress.org/support/users/pixelverbieger/)
 * (@pixelverbieger)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/remove-function-from-hook-wp_head-does-not-work/#post-13648285)
 * okay, I got it …
    wrong hook 🙂
 * This one will work:
 *     ```
       function my_remove_gfonts() {
       	remove_action( 'wp_head', 'hu_print_gfont_head_link', 2 );
       }
   
       add_action( 'after_setup_theme', 'my_remove_gfonts', 2 );
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘remove function from hook ‘wp_head’ does not work’ is closed to new replies.

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

 * 1 reply
 * 1 participant
 * Last reply from: [Christian Sabo](https://wordpress.org/support/users/pixelverbieger/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/remove-function-from-hook-wp_head-does-not-work/#post-13648285)
 * Status: resolved