• Resolved 63N

    (@63n)


    Hello,

    I’m trying to move/dequeue the cookie notice from the footer and put it into the head, so that it can be relatively (not absolutely) positioned above the page content.

    What’s the easiest way to do this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Fotis

    (@fstat)

    Hi there,

    For that you probably need to use some CSS code and it depends on the theme you have installed on your site. Therefore, you need to seek help in the general WordPress support forums:

    https://wordpress.org/support/forums/

    Thread Starter 63N

    (@63n)

    I’m looking for a way to do it pragmatically, rather than CSS, I’d rather not have to use grid or flex box on the body tag unnecessarily if I can avoid it.

    On line 105 of the eu-cookie-law.php (https://github.com/Automattic/jetpack/blob/master/modules/widgets/eu-cookie-law.php) it looks like the script is enqueued… I’m looking for a way to move this to the head, or before the page content – I was hoping something like this, but I can’t seem to get it to work;

    function custom_cookie_notice() {
        wp_dequeue_script( 'eu-cookie-law-script' );
    }
    add_action( 'wp_enqueue_scripts', 'custom_cookie_notice', 999 );

    add_action( 'wp_head', 'eu-cookie-law-script' );

    Plugin Contributor James Huff

    (@macmanx)

    At this time, we cannot provide assistance with custom coding. In this case, I recommend hiring someone for this via https://jetpack.pro/

    Thread Starter 63N

    (@63n)

    Well the main reason I want to move it is because it covers the WooCommerce Storefront theme mobile footer menu, which is fixed to the bottom of the page… I can imagine there’s quite a few other people with the same problem. There must be a simple way to move it?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Move cookie notice to head’ is closed to new replies.