Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Hooked Elements – Javascript && (AND) rendered incorrectly

Home / Forums / Kadence Theme / Hooked Elements – Javascript && (AND) rendered incorrectly

This topic is: Resolved
[Resolved]
Posted in: Kadence Theme
October 16, 2020 at 9:39 am

Hi

I have a hooked element that inserts a couple of javascript scripts (e.g. Google Tag Manager script etc). For example, I have one line:

if ((workingDays1.indexOf(currentDay) != -1 && (currentHour >= startHour1 && currentHour < endHour1)) || (workingDays2.indexOf(currentDay) != -1 && (currentHour >= startHour2 && currentHour < endHour2))) {...

The “&&”s get rendered as (spaced out so they doesn’t render in this post):
& # 0 3 8 ; &
or
& # 0 3 8 ; & # 0 3 8 ;

This behaviour breaks the scripts – any ideas, please?

Thanks

  • This topic was modified 5 years, 5 months ago by Adam Helman.
  • This topic was modified 5 years, 5 months ago by Adam Helman.
  • This topic was modified 5 years, 5 months ago by Adam Helman.
  • The forum ‘Kadence Theme’ is closed to new topics and replies.