How to automatically display an information block on the White Label website

The White Label can display a block with any information, advertisement or image with a certain delay. This is a bit aggressive method, so use it carefully so as not to cause negativity in your visitors.

Preparing for the addition of an extension

At first, add the jquery library connection code to make everything work correctly. Open the White Label settings and go to the Footer section.

Add the following code in the code input box:

<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous">
</script>

Please note! The jquery library connection code is added only once. If you add other White Label extensions, you do not need to re-insert the code.

mceclip0.png

Adding an information block

To add a block call, open the White Label settings and go to the Header section. Add the following code:

<div class="block-inform">
Some text
</div>

Go to the Footer tab and add the following code to start displaying the block:

<script>
window.onload = function() {
setTimeout(function() { $(".block-inform").show(500); }, 5000);
};
</script>

5000 in setTimeout function means the time in milliseconds after which a pop-up window will appear once the White Label is opened.

Style setting

To change the style of the pop-up window, go to the Color Scheme tab and add the following code before the closing </style> tag:

 .block-inform {
position: fixed;
top: 20px;
right: 20px;
background: #000;
color: #fff;
padding: 30px;
display: none;
}

You can change the style as you like. If you lack knowledge of CSS, find a freelance developer who can help you.

Was this article helpful?

Have more questions? Submit a request