Hi Team,
I’m sure this is something simple, though I can’t seem to find a cause.
I have embedded a script in a raw element to display marketing articles for a medical center.
There’s not much else on the page aside from a sidebar.
The script runs okay and displays the article excerpts in the page, though the ‘read more’ links don’t open the full article in the lightbox as intended.
The widget author maintains that it’s the theme and not his script - and it does test okay in 2019theme.
Can you help me out to find where the blocker is?
This is the page in question
Let me know if you need admin access.
Hello @RangesTech,
Thanks for writing in!
I have checked your page and I could see that you are loading the script from a different url. Lightboxes will only work if you have set up the lightbox settings in your WP dashboard. I have inspected the page and there is no lightbox script loaded in the page. Please contact the creator of your JS script and ask for further assistance instead.
Cheers.
Thanks for getting back to me RueNel,
though I’m not sure I fully understand your reply.
As I mentioned in the original post, the script works fine using the twentyninteeen theme on the same instance.
The lightbox is loaded by the script itself apparently - not sure what WP settings you’re talking about? Where do I need to “set up the lightbox settings in my WP dashboard”?
I have asked the vendor for assistance though he maintains the theme is blocking the script from working.
Hello @RangesTech,
Please provide us the script so that we can test it in our local testing server and figure out why it is working in Twenty Nineteen and not in X theme.
Regards.
This is the script:
<script type="text/javascript" src="https://widget.yourhealth.net.au"></script>
<div id="yh-widget" data-articles="8"></div>
The modal overlay is apparently triggered by css alone using the :target selector and location # in the url.
“We determined that one of the theme js files (this one) was overriding the default browser behaviour (smooth scrolling jacking the default event propagation)”
The widget needs to be authorised per domain - check the credentials in the secure note
Thanks!
Hi,
Regretfully this will require integrating the script into the theme which is outside the scope of support.
This is something we can add to our list of feature requests. This way it can be taken into consideration for future development. All of these items are discussed with our team internally and prioritized based on the amount of interest a particular feature might receive. Thanks!
Hi Paul,
I understand that it will require integrating into the theme - but as this is a script that I’ll use exactly once - I’m not going to do that.
The canned response about a feature request is not very helpful.
What I would like to know is what aspect of Pro theme is blocking the script and is there another way to mitigate the impact for this project only?
As mentioned, it works on many other themes - why not Pro?
Hi RangesTech,
I checked the assessment of the script developer, and I am not sure which portion of the default browser behavior he is referring to.
Even if that is the case, I am sure you will understand that we will not be able to change the whole x.js file which is the primary theme functionality front end wise to make sure a 3rd party script might work or not.
As the script developer detected the case, he is the one that can give you a proper temporary fix. From what I understand the click event is not working by the default code of the script. The solution will be to add a new Click event function and trigger the functionality of the lightbox. This is something that you do need to follow up with the script developer.
Thank you for your understanding.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.