Embedding of wordpress

I have sucessfully deployed the bot on aws how do I embedd it on a wordpress site

@tiniltom I never tried integrating it in my wordpress blog, but I think you need to be able to insert a script tag in index.html of your wordpress site. Once you figure out this, you can follow the below guide to embed your bot in your site.

Botpress: How to embed bot in your site?

You can follow these steps to embedd it on wordpress …

https://kriesi.at/documentation/enfold/add-custom-js-or-php-script/

so, for example …

create a js script , save it on your wordpress theme at the js folder. its on this psth -> … wp-content\themes\theme you are using\js `

(function( $ ) {
“use strict”;

$(function() {

    <!-- bot url -->
<script src="http://localhost:3000/assets/modules/channel-web/inject.js"></script>
<script>

//link to your bot and bot id
window.botpressWebChat.init({ host: ‘http://localhost/3000’, botId: ‘abcdef’,

// the best way to load css is hosting it seperately, call it via url
extraStylesheet: 'link to your external css ',

})
//display welcome message on click

function sendMessageOnClick() {
  const iframe = document.querySelector('#bp-widget')
  const widget = iframe.contentWindow.document.getElementsByTagName('button')[0]

  widget.addEventListener('click', function() {
    window.botpressWebChat.sendEvent({
      type: 'proactive-trigger',
      channel: 'web',
      payload: { text: 'fake message' }
    })
  })
}

// Make sure the widget is loaded
setTimeout(function() {
  sendMessageOnClick()
}, 1500)
});

}(jQuery));

`