How to display block any information, advertisement, or image on White Label.
The Travelpayouts White Label tool can display a block with any information, advertisement or image with a certain delay. This is an aggressive method, so use it carefully as to not cause a negative experience for your visitors.
Preparing for the addition of an extension
At first, add the jquery library connection code to make everything work correctly. Open your White Label settings and go to the Sections tab.
Then add the following code to the Site footer block:
<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 only added once. If you add other White Label extensions, you do not need to re-insert the code.
Adding an information block
Place the following code in the Site header section:
<div class="block-inform">
Some text
</div>
Add the following code to the Site footer section 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, add a <style></style> tag to the Site footer block and place the following code inside the 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.