CSS or JS

Hello, 

I am trying to add PushLotus to my editor. The code enables websites to ask visitors for permission to send push notifications. You can choose to add code only on the page(s) on which you want permission box for notifications to appear.

The code is below.  I have added it to the Custom CSS and JS editors, but it's not showing up.  The notification should show up 1 second after a visitor shows up on the site.  Website is MiddletonMediaGroup.com

Thanks


<script type="text/javascript">
    (function(p,u,s,h){
        p._pcq=p._pcq||[];
        p._pcq.push(['_currentTime',Date.now()]);
        s=u.createElement('script');
        s.type='text/javascript';
        s.async=true;
        h=u.getElementsByTagName('script')[0];
        h.parentNode.insertBefore(s,h);
    })(window,document);
    </script>

Comments

  • Hi,

    this requires files customization what in reference to Item Support Policy is not allowed. So if you want to modify files and don't know how, you should contact with your web developer.

    Thanks for understanding!
  • The code is supposed to go between the <head> and </head> in the header editor.  I didn't put it there because I understood that when BeTheme updated, it erased any other code added in the wordpress editor.

    So, why doesn't this work in the custom js or css editor in BeTheme
  • If the code need to be put in head tag, you need to modify includes/header-top-area.php file. And it can not be put under Custom CSS or JS because these sections are for something else. So if you still don't know how to do this, you need to contact with your web developer.
  • ok, does the code get deleted when B/T upgrades?
  • Yes, it would be. So what you can do is copy this file and name it for example _header-top-area.php so you can replace files again after update.
Sign In or Register to comment.