• Latest
  • Trending
  • All

How to add any banner or advertisement to White Label search results

July 5, 2023
🚀 How to Send WooCommerce Order Notifications on WhatsApp Without Using Cloud API

🚀 How to Send WooCommerce Order Notifications on WhatsApp Without Using Cloud API

May 8, 2025
How to Create a Flight and Tour Booking Website & App Using WordPress (With Skyscanner Integration)

How to Create a Flight and Tour Booking Website & App Using WordPress (With Skyscanner Integration)

April 6, 2025
Introducing CargoHub: The Ultimate WooCommerce Courier and Logistics Plugin

Introducing CargoHub: The Ultimate WooCommerce Courier and Logistics Plugin

February 28, 2025
How to Connect WooSMS API with OTP Login Woocommerce Plugin

How to Connect WooSMS API with OTP Login Woocommerce Plugin

February 1, 2025
How to Launch Your Own Flight and Hotel Booking Website with a Ready-Made Script

How to Launch Your Own Flight and Hotel Booking Website with a Ready-Made Script

January 27, 2025
How to Add WhatsApp as a Payment Gateway in WooCommerce | Order on WhatsApp for WooCommerce

How to Add WhatsApp as a Payment Gateway in WooCommerce | Order on WhatsApp for WooCommerce

December 21, 2024
Shipment Tracker for WooCommerce: Simplify Your Shipping Process

Shipment Tracker for WooCommerce: Simplify Your Shipping Process

December 16, 2024
How to Get Your WhatsApp Business Display Name Approved: WhatsApp branding guidelines

How to Get Your WhatsApp Business Display Name Approved: WhatsApp branding guidelines

November 14, 2024
The Core Principles of SEO: A Comprehensive Guide

The Core Principles of SEO: A Comprehensive Guide

October 18, 2024
How to Create a Hotel or Tour Booking Website with HotelEase – Ultimate Hotel Booking Website Software for WordPress

How to Create a Hotel or Tour Booking Website with HotelEase – Ultimate Hotel Booking Website Software for WordPress

November 14, 2024
How to Get and Integrate Flight & Hotel Booking APIs: The Ultimate Guide for Travel Businesses

How to Get and Integrate Flight & Hotel Booking APIs: The Ultimate Guide for Travel Businesses

September 10, 2024
How to Convert Your WooCommerce Website into an Android App in Just a Few Minutes – No Coding Required!

How to Convert Your WooCommerce Website into an Android App in Just a Few Minutes – No Coding Required!

August 29, 2024
  • Home
  • Contact us
  • Domain Checker
  • Portfolio
  • Privacy Policy
Saturday, May 31, 2025
  • Login
Wp Hacks4u
  • Home
  • Domain Checker
  • wordpress
    • woocommerce
    • SSL
    • Google Map
  • Tech
  • Portfolio
  • CargoHub
No Result
View All Result
Wp Hacks4u
No Result
View All Result
Home Travelpayouts

How to add any banner or advertisement to White Label search results

by RAHUL
July 5, 2023
in Travelpayouts, Uncategorized
1
564
SHARES
1.6k
VIEWS
Share on FacebookShare on Twitter

Travelpayouts White Label has the ability to add various extensions, such as widgets, banners, and affiliate links from advertisers. In this article, we will talk about how to add any code to the search results (between flights or hotels).

To display any text, banner, or advertisement (for example, from Google) in the White Label search results, open your White Label settings and go to the Sections tab. At the bottom of the code block Site footer, place the following code:

<!-- START connect the library for processing jquery -->
<script
 src="https://code.jquery.com/jquery-3.3.1.min.js"
 integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
 crossorigin="anonymous"></script>
<!-- END connect the library for processing jquery -->

<div id="append-block"></div>
<script>
 $(function(){
 $("div#append-block").click(function(){

 //check the fifth block in the flights search results, if we have it, display advertising after it, if not, display after the first block  if ($(".ticket:nth-child(5)").length > 0) {
    if ($(".ticket--with-labels").length > 0) {
        $("div.dpt-block-1").show();
        $(".ticket--with-labels").before($("div.dpt-block-1"));
    }
    if ($(".ticket:nth-child(4)").length > 0) {
        $("div.dpt-block-2").show();
        $(".ticket:nth-child(4)").after($("div.dpt-block-2"));
    }
    if ($(".layout-manager").length > 0) {
        $("div.dpt-block-3").show();
        $(".layout-manager").append($("div.dpt-block-3"));
    }
    if ($(".ticket:nth-child(7)").length > 0) {
        $("div.dpt-block-4").show();
        $(".ticket:nth-child(7)").after($("div.dpt-block-4"));
    }
  } else {
    if ($(".ticket--with-labels").length > 0) {
        $("div.dpt-block-1").show();
        $(".ticket--with-labels").before($("div.dpt-block-1"));
    }
    if ($(".ticket:nth-child(1)").length > 0) {
        $("div.dpt-block-2").show();
        $(".ticket:nth-child(1)").after($("div.dpt-block-2"));
    }
    if ($(".layout-manager").length > 0) {
        $("div.dpt-block-3").show();
        $(".layout-manager").append($("div.dpt-block-3"));
    }
    if ($(".ticket:nth-child(1)").length > 0) {
        $("div.dpt-block-4").show();
        $(".ticket:nth-child(1)").after($("div.dpt-block-4"));
    }
  }

//check the fifth block in the hotels search results, if we have it, display advertising after it, if not, display after the first block
  if ($(".search-results-cards-wrapper-card:nth-child(5)").length > 0) {
    if ($(".search-results-cards-wrapper-card:first-child").length > 0) {
        $("div.dpt-block-1").show();
        $(".search-results-cards-wrapper-card:first-child").before($("div.dpt-block-1"));
    }
    if ($(".search-results-cards-wrapper-card:nth-child(4)").length > 0) {
        $("div.dpt-block-2").show();
        $(".search-results-cards-wrapper-card:nth-child(4)").after($("div.dpt-block-2"));
    }
    if ($(".search_results-wrapper").length > 0) {
        $("div.dpt-block-3").show();
        $(".search_results-wrapper").append($("div.dpt-block-3"));
    }
    if ($(".search-results-cards-wrapper-card:nth-child(7)").length > 0) {
        $("div.dpt-block-4").show();
        $(".search-results-cards-wrapper-card:nth-child(7)").after($("div.dpt-block-4"));
    }
  } else {
    if ($(".search-results-cards-wrapper-card:first-child").length > 0) {
        $("div.dpt-block-1").show();
        $(".search-results-cards-wrapper-card:first-child").before($("div.dpt-block-1"));
    }
    if ($(".search-results-cards-wrapper-card:nth-child(1)").length > 0) {
        $("div.dpt-block-2").show();
        $(".search-results-cards-wrapper-card:nth-child(1)").after($("div.dpt-block-2"));
    }
    if ($(".search_results-wrapper").length > 0) {
        $("div.dpt-block-3").show();
        $(".search_results-wrapper").append($("div.dpt-block-3"));
    }
    if ($(".search-results-cards-wrapper-card:nth-child(1)").length > 0) {
        $("div.dpt-block-4").show();
        $(".search-results-cards-wrapper-card:nth-child(1)").after($("div.dpt-block-4"));
    }
  }

});

//emulate a click to initiate the display of ads
 setTimeout(function(){
 $("div#append-block").click();
 }, 9000);
});
</script>

To change the contents of a block, edit the code located between the div tags with the dpt-block classes:

<div class="dpt-block-1" style="display:none">
//Here you can place any code or text.
</div>

This is how to place the banner code with a link to the advertiser’s website:

<div class="dpt-block-1" style="display:none">
<a target="_blank" href="https://c45.travelpayouts.com/click?shmarker=78606&promo_id=1300&source_type=banner&type=click"><img src="https://c45.travelpayouts.com/content?promo_id=1300&shmarker=78606&type=init" alt="728x90" width="728" height="90"></a>
</div>
Share226Tweet141
RAHUL

RAHUL

  • Trending
  • Comments
  • Latest
How to make fake WooCommerce reviews? | Automatically generate reviews for your WooCommerce product

How to make fake WooCommerce reviews? | Automatically generate reviews for your WooCommerce product

June 18, 2022
How to Create a Hotel or Tour Booking Website with HotelEase – Ultimate Hotel Booking Website Software for WordPress

How to Create a Hotel or Tour Booking Website with HotelEase – Ultimate Hotel Booking Website Software for WordPress

November 14, 2024
How to convert a WordPress or Woocommerce website into an App for Free

How to convert a WordPress or Woocommerce website into an App for Free

June 30, 2023
How to Buy a Domain & Hosting in Hostinger And install WordPress in 5 Minute

How to Buy a Domain & Hosting in Hostinger And install WordPress in 5 Minute

4
HOW TO CREATE A CAKE ORDERING WEBSITE | ONLINE CAKE SHOP | TUTORIAL

HOW TO CREATE A CAKE ORDERING WEBSITE | ONLINE CAKE SHOP | TUTORIAL

1
HOW TO MAKE WOOCOMMERCE FOOD ORDERING WEBSITE LIKE ZOMATO&SWIGGY

HOW TO MAKE WOOCOMMERCE FOOD ORDERING WEBSITE LIKE ZOMATO&SWIGGY

1
🚀 How to Send WooCommerce Order Notifications on WhatsApp Without Using Cloud API

🚀 How to Send WooCommerce Order Notifications on WhatsApp Without Using Cloud API

May 8, 2025
How to Create a Flight and Tour Booking Website & App Using WordPress (With Skyscanner Integration)

How to Create a Flight and Tour Booking Website & App Using WordPress (With Skyscanner Integration)

April 6, 2025
Introducing CargoHub: The Ultimate WooCommerce Courier and Logistics Plugin

Introducing CargoHub: The Ultimate WooCommerce Courier and Logistics Plugin

February 28, 2025
Wp Hacks4u

Copyright © 2025 Wphacks4u.com

Navigate Site

  • Home
  • Contact us
  • Domain Checker
  • Portfolio
  • Privacy Policy

Follow Us

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Login
Use Phone Number
Use Email Address
Not a member yet? Register Now
Reset Password
Use Phone Number
Use Email Address
Register
Already a member? Login Now
This is a test site
Build with Digits
Protected by   
No Result
View All Result
  • Home
  • Domain Checker
  • wordpress
    • woocommerce
    • SSL
    • Google Map
  • Tech
  • Portfolio
  • CargoHub

Copyright © 2025 Wphacks4u.com

Enable Notifications OK No thanks