support home

Back to website
Welcome
Login  Sign up
In Progress

feature request: ability to remove iubenda banners from certain pages

New feature request here. Please upvote if you find this useful. 

Need the ability to remove cookie banner popups from certain pages on my wordpress site. I have landing pages and informational pages as well as certain sales pages where I do not want nor need the iubenda cookies to pop up.  

A simple checkbox inside my wordpress page would be great or adding a custom code to a specific page would also work. I can add a code to a specific page inside my wordpress pages. 


5 people like this idea
  • Hello Sergio,


    Thank you for your request. 


    I'm glad to inform you that your request has been taken into account and our developers team is already working on its implementation.
    We are going to update this thread as soon as the feature is online.


    In the meantime, don't hesitate to contact us again if you need further information or assistance.


    Kind Regards,

    The iubenda team

  • Android com Chrome browser.
  • Hi has there been an update to this?

  • Hello there,


    a specific feature is not available however with a workaround it is possible to hide the banner on certain pages by adding a custom script.


    Please check the example below:

    <script type="text/javascript">
    var _iub = _iub || [];
    _iub.csConfiguration = {"cookiePolicyUrl":"http://provawordpress.local/cookie-policy/","consentOnContinuedBrowsing":false,"enableTcf":false,"whitelabel":false,"lang":"en-GB","siteId":1129739,"floatingPreferencesButtonDisplay":"bottom-right","perPurposeConsent":true,"cookiePolicyId":33731144, "banner":{ "closeButtonRejects":true,"acceptButtonDisplay":true,"customizeButtonDisplay":true,"explicitWithdrawal":true,"position":"float-top-center","closeButtonCaption":"<button type=\"button\" class=\"iubenda-cs-close-btn\" tabindex=\"0\" role=\"button\" aria-pressed=\"false\" style=\"background-color: rgb(239, 239, 239) !important; border-radius: 55px !important; border: 1px solid rgb(119, 119, 119) !important; font-size: 16px !important; font-weight: bold !important; padding: 10px 20px !important; height: 34px !important; color: rgb(102, 102, 102) !important; visibility: visible;\">Continue without accepting</button>" }, "footer":{"btnCaption":"Custom Test Here"}};
    
    </script>
    <script type="text/javascript" src="//cdn.iubenda.com/cs/tcf/stub-v2.js"></script>
    <script type="text/javascript" src="//cdn.iubenda.com/cs/iubenda_cs.js" charset="UTF-8" async></script>
    
    <script>
    
    //custom script to add
    
    if(window.location.pathname === "/cookie-policy/") { 
        
         document.head.innerHTML = document.head.innerHTML + '<style>div#iubenda-cs-banner { display: none !important; } </style>';
    
    }
    </script>

     The custom script (to be modified according to your scenario) adds a CSS rule that hides the CS banner on cookie-policy page. In this case, the URL of the page that hosts the Cookie Policy is http://provawordpress.local/cookie-policy/

    <script>
    if(window.location.pathname === "/cookie-policy/") {     
         document.head.innerHTML = document.head.innerHTML + '<style>div#iubenda-cs-banner { display: none !important; } </style>';
    }
    </script>

     How to customize it:


    So if your Cookie Policy is on a page with URL www.test.com/cpPage, the previous script should be modified in this way:

     

    <script>
    if(window.location.pathname === "/cpPage/") {     
         document.head.innerHTML = document.head.innerHTML + '<style>div#iubenda-cs-banner { display: none !important; } </style>';
    }
    </script>

     Let us know if you have any doubt or question.


    Kind Regards,

    The iubenda team