Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1327025

    Hi Enfold team,
    I’m using the lightbox code for some subscription forms which works great. Is there a way to exclude the accept cookies prompt for select pages? I’m already asking and tracking via the subscription form to accept the privacy policy. Thanks for your help.
    /?iframe=true

    #1327251

    Hey Julie,

    Thank you for the inquiry.

    You can use this code in the functions.php file to disable the message bar on specific pages.

    add_action("wp", function() {
    	if(is_page(array(3251))) {
    		avia_update_option("cookie_consent", "hide_bar");
    	} else {
    		avia_update_option("cookie_consent", "cookie_consent");
    	}
    }, 999);
    
    

    Include the IDs of the pages where you need to hide the message bar in the array within the is_page conditional function above.

    Best regards,
    Ismael

    #1327252

    Hey Julie,

    Thank you for the inquiry.

    You can use this code in the functions.php file to disable the message bar on specific pages.

    add_action("wp", function() {
    	if(is_page(array(3251))) {
    		avia_update_option("cookie_consent", "hide_bar");
    	} else {
    		avia_update_option("cookie_consent", "cookie_consent");
    	}
    }, 999);
    
    

    Include the IDs of the pages where you need to hide the message bar in array within the is_page conditional function above.

    Best regards,
    Ismael

    #1327305

    Thank you, thank you ;-) It works well Ismael. Have a great week.
    j

    #1327366

    Hi,

    No problem! Glad it is working. Please feel free to open another thread if you need anything else.

    Have a nice day.

    Best regards,
    Ismael

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Exclude cookies for select content’ is closed to new replies.