Skip to content

Instantly share code, notes, and snippets.

@anthonysbrown
Last active May 24, 2018 17:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anthonysbrown/8d6e083a3503981b63e0a171f19730a5 to your computer and use it in GitHub Desktop.
Save anthonysbrown/8d6e083a3503981b63e0a171f19730a5 to your computer and use it in GitHub Desktop.
functions.php
<?php
add_action('wp_head','_express_css');
function _express_css(){
if($_COOKIE['viewed_cookie_policy'] == ''){
echo '<style type="text/css">
.footer-padding{margin-bottom:45px}
</style>
<script type="text/javascript">
jQuery( document ).ready(function($) {
$("footer").addClass("footer-padding");
$("#cookie_action_close_header").on("click",function(){
$("footer").removeClass("footer-padding");
});
});
</script>
';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment