Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude cookie notice on some pages #41

Open
Kulvinderjatt opened this issue Aug 30, 2018 · 2 comments
Open

Exclude cookie notice on some pages #41

Kulvinderjatt opened this issue Aug 30, 2018 · 2 comments

Comments

@Kulvinderjatt
Copy link

Hi guys,

I am using cookie notice plugin and wants not to show the cookie notice on my thank you page in iframe after i fill some form on my site and redirected to thank you page.

Is there a way that can i place some code in cookie notice settings page to hide the cookie notice message based on page id?

Please note: until we do not accept the cookie it shows on all pages as by design, i want to hide it on some pages till it is not accepted.

Thanks,

@chesio
Copy link
Contributor

chesio commented Sep 18, 2018

Hi @Kulvinderjatt,

I don't know about any setting, but you can remove the HTML with cookie notice on such pages with help of cn_cookie_notice_output filter:

add_filter('cn_cookie_notice_output', '__return_empty_string');

You only have to take care to add this filter only when necessary. Since the filter is executed in function hooked to wp_footer action, it can be added as late as within page template file (if you have any special page template for thank you page).

@Kulvinderjatt
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants