How to get javascript to show in a location with a class?
-
Hi there @Armin-Unruh @mariusjopen
Im trying to get this BandsInTown tour event widget to display.
I've tried to use the wordpress plugin but its displaying a bit funnily.
I'm now trying to use the code that i've generated on their website - you are meant to then paste this code in and it will display:
<script charset="utf-8" src="https://widget.bandsintown.com/main.min.js"></script> <a class="bit-widget-initializer" data-artist-name="Portico Quartet" data-display-local-dates="false" data-display-past-dates="false" data-auto-style="false" data-text-color="#000000" data-link-color="#FFFFFF" data-popup-background-color="#FFFFFF" data-background-color="#FFFFFF" data-display-limit="15" data-link-text-color="#000000"></a>
If i paste this into 'Custom Head and HTML' I can get it to render but only at the very top of my page! I want to be able to place it somewhere on a page - any ideas how?
Thanks!
D
-
@dmb any ideas on this @Armin-Unruh @mariusjopen ? :)
-
Hi @DMB
using Javascript, especially from other services might get tricky.You should have a look here:
http://laytheme.com/documentation.html#custom-javascriptThe code you want to embed does not fit those specs. You might need to change it (Impossible, right?)
Let me know your thoughts :-)
Best!
Marius
-
@mariusjopen Yeah I've had a look and tried to adapt it but im not a javascript pro..
The thing is, I can get it to appear if I put the code into 'custom head and html' but only at the top of the page.
I guess what im asking is - is there a way to tell the code to locate itself in a certain row with a class?
-
Hi @DMB
the plugin won't work because it used different jQuery languages like in Laytheme.I think you won't get it to work – unless you go into the code. Which is rather difficult. I don't know how to run that plugin in a specific row.
Sorry about that!
Marius
5/5
Need custom programming for your Lay Theme site?
I regularly add new features to Lay Theme for free, based on user feedback. But if you or your client need something more specific, I’m happy to offer custom paid programming tailored to your project.
Email info@laytheme.com with the subject "Custom paid programming for Lay Theme" and a short description of what you need — I’ll reply with a cost estimate.
Custom features I build often make it into future Lay Theme updates, so your idea might benefit the whole community.
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it