• Resolved Christian Sabo

    (@pixelverbieger)


    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

    (@pixelverbieger)

    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.