• Hi there, we built a code, for particles moving that will interact as you scroll or hover over it. The code’s in HTML and JS. I want to place it as a banner on my website. I can’t, or none of my developers can figure out, on how to add this into Word Press. Has anyone done it? Can you kindly suggest?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    The solution depends on what type of theme you use (classic or block) and where you want the banner to appear (page content, widget area, header, footer, etc.)

    Your main challenge is JS code cannot be reliably inserted into WP content, it is likely to become corrupted on output. One way to get around this is to implement everything as a shortcode. You can then add the shortcode to where you want it to appear. Depending on where that is, if it’s not automatically expanded to your embed code, you may need to explicitly expand it with PHP like so:
    <?php echo do_shortcode('[your-shortcode-name]'); ?>

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.