How to load Hyvor Talk on load, click, or scroll?

Hyvor Talk supports three ways to three loading methods.

  1. On load (Default): When the web page loads
  2. On click: when the user clicks a button
  3. On scroll: when the user scrolls downs to the comments section (also known as Lazy Loading)

Loading Modes with Javascript Code

If you used manual, ghost, or blogger methods for installation, locate the Javascript code we provided which looks like the following.

<div id="hyvor-talk-view"></div>
<script type="text/javascript">
    var HYVOR_TALK_WEBSITE = YOUR_WEBSITE_ID;
    var HYVOR_TALK_CONFIG = {
        url: false,
        id: false
    };
</script>
<script async type="text/javascript" src="//talk.hyvor.com/web-api/embed"></script>

Adding loadMode key to the HYVOR_TALK_CONFIG variable can change the load mode.

How to load Hyvor Talk when the user clicks a button?

First, you will need to include a button in your web page to let users to click.

<button id="my-button">Show Comments</button>

Add loadMode: "click" and clickId: "ID_OF_BUTTON" as following.

var HYVOR_TALK_CONFIG = {
    url: false,
    id: false,
    loadMode: "click",
    clickId: "my-button"
};

How to load Hyvor Talk when the user scrolls down to the comments section?

Simply add loadMode: "scroll" as following.

var HYVOR_TALK_CONFIG = {
    url: false,
    id: false,
    loadMode: "scroll"
};

Loading Modes with WordPress plugin

If you use our wordpress plugin, you can easily change the loading mode from the plugin page of your wordpress admin panel. Choose any method from the "Loading Mode" dropdown.