tobitobsn
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
I could solve it! I placed the “mu-plugins” folder in the plugins folder, not in wp-content.
Hi!
I’ve tried the code for this page: https://www.bitfactory.at/newstest/
I put it in a php-File which is located in the mu-plugins directory. But I had no luck. Could you please have a look? Thank you in advance!The code is:
<?php /** * 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 $cookiewarning_required * * @return bool */ function cmplz_my_filter_site_needs_cookiewarning( $cookiewarning_required ) { $url = is_ssl() ? "https" : "http" . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; if ( strpos($url, 'newstest') !== FALSE ) { $cookiewarning_required = false; } return $cookiewarning_required; } add_filter( 'cmplz_site_needs_cookiewarning', 'cmplz_my_filter_site_needs_cookiewarning' ); ?>- This reply was modified 5 years, 9 months ago by tobitobsn.
Thanks @damienomahony that worked for me either!
Viewing 3 replies - 1 through 3 (of 3 total)