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.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.