Trust index shortcode not loading on the slider
-
Hi guys,
I’m experiencing an issue with embedding a Trustindex widget inside a Meta Slider on my website. The widget works perfectly when placed in other sections of the site, but it does not load properly within the Meta Slider.
Here’s what I’ve tried so far:
- Adding the widget inside a Raw HTML Slide in Meta Slider
- I used:
<div>[trustindex data-widget-id=d05f67b35ec40554d686c83757e]</div>
- However, the widget still does not load inside the slider.
- I used:
- Ensuring Trustindex scripts load correctly
- I placed the shortcode elsewhere on the page (footer, hidden div) to force script loading, but it didn’t help.
- Checking for JavaScript conflicts
- I inspected the console (F12 → Console Tab) and found no clear script errors related to Trustindex.
- Defer or Async Script Loading
- I tried manually loading the Trustindex script using: htmlCopyEdit
<script> setTimeout(function() { var script = document.createElement("script"); script.src = "https://cdn.trustindex.io/loader.js"; document.body.appendChild(script); }, 1000); </script>
- This also did not resolve the issue.
- I tried manually loading the Trustindex script using: htmlCopyEdit
Since the widget loads fine in other areas of the website, I suspect the issue may be related to how Meta Slider handles external scripts or shortcode execution. Could you provide guidance on making Trustindex work properly inside a Meta Slider?
Looking forward to your help. Thanks!
The page I need help with: [log in to see the link]
- Adding the widget inside a Raw HTML Slide in Meta Slider
-
Hi @rivizzz. Thanks for using MetaSlider.
It looks like you’re using MetaSlider Pro here. Can you open a support ticket via our site? We’ll be happy to help.
We do this because we’re not allowed to support commercial products here on the forums: https://wordpress.org/support/guidelines/#do-not-post-about-commercial-products
Hi Steve, thanks a lot for your reply.
I don’t use Meta Slider Pro. How can we solve the problem then?
Steve?
Hi @rivizzz
You mentioned using a “Raw HTML Slide”. That sounds like a feature in the Pro plugin and there’s nothing similar in the Free version. The Pro feature is designed for situations like this.
Can you explain more about how you’re attempting this?
I simply add TrustIndex shortcode into the slider using HTML editor and it’s being remove when trying to load the page and check it with console.
-
This reply was modified 1 month ago by
Arsenii Yesaulov.
@rivizzz what plugin is this, please? I can’t find a Trustindex plugin here on WordPress.org that we can test with.
@stevejburge Sorry only saw your reply.
It’s called Widgets for Google Reviews by Trustindex.io
https://wordpress.org/plugins/wp-reviews-plugin-for-google/Hi @rivizzz. I ran a test with that plugin. It does help to load that widget elsewhere on the screen. This was the successful end result for me: https://imgur.com/a/RweiJ2N
Hi @stevejburge , what do you mean to run it elsewhere. Could you elaborate please?
Hi @rivizzz
the CSS and JS from trust index are not enqueued due a limitation in WordPress due can’t enqueue CSS and JS files for nested shortcodes. In this case MetaSlider is inserted as shortcode into post/page content, and then trust index is also added as a shortcode but inside MetaSlider.
I recommend to load the JS and CSS if any for trust index through your themes functions.php file.
Regards
the CSS and JS from trust index are not enqueued due a limitation in WordPress due can’t enqueue CSS and JS files for nested shortcodes
@rivizzz my apologies. This statement is not accurate. It happens in some cases.
When testing the Trust index shortcode with a Custom HTML slide type (from Pro version), it works fine after adding shortcode support.
Regards
I believe this is now solved after emailing with the original poster and working on some code changes to fit the Trust Index plugin.
-
This reply was modified 1 month ago by
- You must be logged in to reply to this topic.