Title: Cookie preference shortcode link not working
Last modified: July 10, 2018

---

# Cookie preference shortcode link not working

 *  Resolved [Etienne](https://wordpress.org/support/users/epipo/)
 * (@epipo)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/cookie-preference-shortcode-link-not-working/)
 * Hello,
 * I am trying to display the Cookie Preference panel with the shortcode (not the`
   showMinimizedButton` option) but when I click on the link nothing happen (no 
   error in the console and no panel).
 * Here are my logic options settings: [https://cloudup.com/c5EMHDIXT6e](https://cloudup.com/c5EMHDIXT6e)
 * I am on the latest version of WordPress and of your plugin.
 * You can view the website here : [studiodpe.com](https://studiodpe.com) (the shortcode
   is used in the footer with the following text: “Gérer les cookies”).
 * Thanks for your help!

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

 *  Plugin Author [Nicola Modugno](https://wordpress.org/support/users/shark986/)
 * (@shark986)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/cookie-preference-shortcode-link-not-working/#post-10479735)
 * Hello [@epipo](https://wordpress.org/support/users/epipo/),
 * with Chrome I see the following error in console:
    `Uncaught TypeError: Cannot
   read property 'smoothScroll' of null at S (main.min.js:1)`
 * I also see that the link that should open the panel has been modified. It should
   be `<a href="#" class="OpenCookiePreferences">Gestion des cookies</a>` but it
   is `<a href="#cookies" class="OpenCookiePreferences">Gestion des cookies</a>`.
 * I think that a “scroll plugin” is trying to run some graphic effects on the DOM
   element with id “cookies”, but there is no element with that id!
 * Could you exclude the cookie link from the scroll effect system?
 * Nicola
 *  Thread Starter [Etienne](https://wordpress.org/support/users/epipo/)
 * (@epipo)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/cookie-preference-shortcode-link-not-working/#post-10480059)
 * Hello [@nicola](https://wordpress.org/support/users/nicola/),
 * Thanks for your fast answer! Indeed I have a smooth scroll plugin.
 * I have disabled it for this link and corrected the javascript error. I have also
   reverted to an empty hashtag.
 * However it is still not working, it only jump to the top as it’s the normal behavior
   of the browser.
 * Could you tell me a bit more about how the link is targeted? Is it linked to 
   the classname?
 * Thanks for your help!
    -  This reply was modified 7 years, 11 months ago by [Etienne](https://wordpress.org/support/users/epipo/).
 *  Plugin Author [Nicola Modugno](https://wordpress.org/support/users/shark986/)
 * (@shark986)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/cookie-preference-shortcode-link-not-working/#post-10480186)
 * Ok [@epipo](https://wordpress.org/support/users/epipo/), I have found the problem.
 * The theme is echoing the footer after the “wp_print_footer_scripts” WordPress
   hook. The theme should print the footer with the “wp_footer” hook, which runs
   before the “wp_print_footer_scripts”, as you can see on codex ([https://codex.wordpress.org/Plugin_API/Action_Reference](https://codex.wordpress.org/Plugin_API/Action_Reference)).
 * This cause the link to be inserted after the kit has attached the click event
   to links with the class “OpenCookiePreferences”.
 *  Thread Starter [Etienne](https://wordpress.org/support/users/epipo/)
 * (@epipo)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/cookie-preference-shortcode-link-not-working/#post-10480208)
 * Yep, you’re a genius!! My bad I haven’t realized that…
    Thanks a lot for your
   help 🙂
 *  Plugin Author [Nicola Modugno](https://wordpress.org/support/users/shark986/)
 * (@shark986)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/cookie-preference-shortcode-link-not-working/#post-10480301)
 * You are welcome! 🙂

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

The topic ‘Cookie preference shortcode link not working’ is closed to new replies.

 * ![](https://ps.w.org/smart-cookie-kit/assets/icon-128x128.png?rev=1306201)
 * [Smart Cookie Kit](https://wordpress.org/plugins/smart-cookie-kit/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/smart-cookie-kit/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/smart-cookie-kit/)
 * [Active Topics](https://wordpress.org/support/plugin/smart-cookie-kit/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/smart-cookie-kit/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/smart-cookie-kit/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Nicola Modugno](https://wordpress.org/support/users/shark986/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/cookie-preference-shortcode-link-not-working/#post-10480301)
 * Status: resolved