Need help hiding div on forums while embeded w3all url active using script
Posted: Thu Mar 01, 2018 1:13 pm
EDIT: after hours of trying, I had my script working on the WP side : https://thetopfew.com/community/
I'm using this to hide two elements for WP, BUT doesn't work for the embed forum:
I tried the script all over, footer, header, and both overall_header, overall_footer.. not sure :headscratch: Perhaps is has everything to do with the resizer.js? Or this url match isn't gonna work.. need another idea for the embed forum.
The only two elements I want hidden on forums if you were to inspect that link above, is the: .top-bar & #headerbar
(then I have to figure out why the floating top nav-bar isn't working on embed template.. hopefully last thing and it will look very good)
I'm using this to hide two elements for WP, BUT doesn't work for the embed forum:
Code: Select all
<script type = "text/javascript">
(function(){
var url = window.location.href;
if (/(community)/i.test(url)) {
document.getElementsByClassName("hideEmbedWP")[0].style.display = 'none'; //hides WP footer
document.getElementsByClassName("woocommerce-breadcrumb")[0].style.display = 'none';
}
})();
</script>
The only two elements I want hidden on forums if you were to inspect that link above, is the: .top-bar & #headerbar
(then I have to figure out why the floating top nav-bar isn't working on embed template.. hopefully last thing and it will look very good)