Lay Theme Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    How to get javascript to show in a location with a class?

    General Discussion
    2
    5
    467
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DMB
      DMB last edited by

      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 1 Reply Last reply Reply Quote 0
      • DMB
        DMB @DMB last edited by

        @dmb any ideas on this @Armin-Unruh @mariusjopen ? :)

        1 Reply Last reply Reply Quote 0
        • mariusjopen
          mariusjopen Global Moderator last edited by

          Hi @DMB
          using Javascript, especially from other services might get tricky.

          You should have a look here:
          http://laytheme.com/documentation.html#custom-javascript

          The 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

          www.mariusjopen.world

          DMB 1 Reply Last reply Reply Quote 0
          • DMB
            DMB @mariusjopen last edited by

            @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?

            1 Reply Last reply Reply Quote 0
            • mariusjopen
              mariusjopen Global Moderator last edited by

              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

              www.mariusjopen.world

              1 Reply Last reply Reply Quote 0
              • First post
                Last post

              Before you post

              Use the Search Feature. Maybe there is already a solution to your issue.

              1. Update Lay Theme and all Lay Theme Addons
              2. Disable all Plugins
              3. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code ", click "Save Changes"
              4. Now see if your problem solved itself
              5. Go here, see if your problem is listed here:
              Troubleshooting

              When you post:
              1. Post a link to where the problem is
              2. If the problem is difficult to explain, post screenshots / link to a video to explain it

              Thanks!

              Online Users

              D
              S
              E

              Recent Topics

              • A

                Unable to update lay theme / to login wp admin

              • A

                New button feature not available

              • S

                Theme crashed - because of Polylang?

              • A

                carousel addon not working after update

              laytheme.com