• Resolved Montrealenligne

    (@toitdeneige)


    Hello,

    I have a block of content with Lieu / Coordonnées / Photos in the page, but the block only appear when I click to accept in the cookie banner.

    I try to disable script blocking of Google Maps in the Services section without success.

    I try to find the exact script URL I need to whitelist when I inspect the code page but I don’t need what I need to whitelist.

    The Complianz website is not well documented for the instructions, maybe some video can be good or a more detailed steps explanation.

    I’m awaiting your reply!

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter Montrealenligne

    (@toitdeneige)

    Hello, I finally succeeded in excluding the Event pages from the script blocker by adding this PHP code to the functions.php file instead of the MU-Plugin folder.

    This is the code :
    defined( ‘ABSPATH’ ) or die( “you do not have access to this page!” );

    /**

    • Filter post types for cookiewarning
    • It’s too early to use global $post or url_to_postid(), so we do a simple text comparison
      *
    • @param bool $cookiewarning_required
      *
    • @return bool
      */
      function cmplz_my_filter_site_needs_cookiewarning( $cookiewarning_required ) {
      $url = is_ssl() ? “https” : “http”;
      $url .= “://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]”; // N’affichez pas la bannière de cookies sur les pages où l’URL contient “event”
      if ( strpos( $url, ‘event’ ) !== false ) {
      $cookiewarning_required = false; if ( !defined('CMPLZ_DO_NOT_BLOCK') ) { define('CMPLZ_DO_NOT_BLOCK', true); } } return $cookiewarning_required;
      }

    add_filter( ‘cmplz_site_needs_cookiewarning’, ‘cmplz_my_filter_site_needs_cookiewarning’ );

    Thanks!

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.