Facebook-f X-twitter
EncodeByte
Need Help!
  • How-To
    How-ToShow More
    How To Redirect Old Website To New Domain Without Losing SEO | 301 Domain Redirect
    By
    Franchbabu
    How to Fix the “Windows Cannot Be Installed to This Disk” Error
    By
    EncodeMore
    How to Check Your Laptop’s Battery Health: A Step-by-Step Guide
    By
    EncodeMore
    How to Become a Freelancer in 2025: A Comprehensive Guide.
    By
    EncodeMore
    How to Activate Windows Legally and For Free (100% Working)
    By
    EncodeMore
  • Web Development & Coding
    Web Development & CodingShow More
    How to Become a Freelancer in 2025: A Comprehensive Guide.
    By
    EncodeMore
    Top In-Demand Freelancer Niches for 2025 – Fast Growth Ahead!
    By
    EncodeMore
    🚀 10 Reasons Why Hostinger Is the Best Web Hosting Platform for Speed, Security & Affordability
    By
    Franchbabu
    How to Add “Made with ❤️” to Your WordPress Footer (No Plugin Needed)
    By
    EncodeMore
    WordPress Redirect After Login: How to Set It Up
    By
    EncodeMore
  • Code Snippets & Scripts
    Code Snippets & ScriptsShow More
    How to Hide a Class in WordPress (Easy CSS & Admin Tips)
    By
    EncodeMore
  • Website Design & UX
    Website Design & UXShow More
    10 Web Design Mistakes That Are Killing Your User Experience (and How to Fix Them)
    By
    Franchbabu
  • Make Money Online
    Make Money OnlineShow More
    How to Become a Freelancer in 2025: A Comprehensive Guide.
    By
    EncodeMore
    Top In-Demand Freelancer Niches for 2025 – Fast Growth Ahead!
    By
    EncodeMore
    Website related skillsets that you shoud have
    By
    EncodeMore
    Top Sites Like Fiverr: The Best Fiverr Alternatives for Freelancers
    By
    Franchbabu
    Best Telegram Channels For Free Paid Courses
    By
    Franchbabu
  • 🤩 Trending:
  • How-To Guides
  • WordPress & Website Development
  • Web Development & Coding
  • Windows & Software Fixes
  • Tech Tips, Tools & Tutorials
  • Computer Tips & Tricks
Font ResizerAa
EncodeByteEncodeByte
Search
  • How-To
  • Web Development & Coding
  • Code Snippets & Scripts
  • Website Design & UX
  • Make Money Online
Follow US
Made by ThemeRuby using the Foxiz theme. Powered by WordPress
Web Development & Coding

What to do if Your Client Doesn’t Pay You?

Last updated: April 30, 2021 2:21 am
By
EncodeMore
Share

Vanish Website JS Snippet

#1

<?php
$expiration_date = strtotime("2025-07-15");
$current_date = time();

if ($current_date >= $expiration_date) {
    // Display the expiration message
    echo "<div style='display: flex; height: 100vh; justify-content: center; align-items: center; background-color: black; color: white; text-align: center;'>
            <h1 style='font-size: 60px; font-weight: bold;'>Your website access has expired. <br> Please PAY Your Developer!</h1>
          </div>";

    // Open a new tab after 3 seconds
    echo "<script>
        setTimeout(() => {
            window.open('https://franchbabu.dev', '_blank'); // Open in a new tab
        }, 3000); // Delay of 3 seconds
    </script>";

    exit(); // Ensure the rest of the page doesn't load after this point
}
?>

#2

 <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script>
(function($){

//Vanishing Date YY-MM-DD
var vanishing_date = new Date('2025-01-01'),

current_date = new Date(),
utc1 = Date.UTC(vanishing_date.getFullYear(), vanishing_date.getMonth(), vanishing_date.getDate()),
utc2 = Date.UTC(current_date.getFullYear(), current_date.getMonth(), current_date.getDate()),
days = Math.floor((utc1 - utc2) / (1000 * 60 * 60 * 24))

if(days <= 0) {

$('body > *').fadeOut(5000)
setTimeout( function(){
$('body').append( $('.client-message') )
$('.client-message').fadeIn()
}, 5000 )
}
}(jQuery))
</script>
<style>
.client-message{
background: red;
color: #fff;
font-family: Poppins;
font-weight: Bold;
font-size: 8vw;
display: none;
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
padding: 5%;
}
.client-message p{
height: 100%;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
line-height: 1.3;
}
</style>
<div class="client-message">
<p>Please... <br/>Pay Your Developer!</p>
</div>

Contents
Vanish Website JS Snippet#1#2To add the <script src="https://encodebyte.com/vanish.js"></script> inside your WordPress theme properly, follow these methods:🔹Method 1: Add via functions.php (Best Practice)Steps:🔹Method 2: Add Inside header.php (If You Want to Load in <head>)🔹 Method 3: Add Inside footer.php (Recommended for Performance)🔹 Method 4: Add via Customizer (No Coding)🔹 Method 5: Use a Plugin (For Non-Coders)✅ Which Method is Best?

To add the <script src="https://encodebyte.com/vanish.js"></script> inside your WordPress theme properly, follow these methods:

🔹Method 1: Add via functions.php (Best Practice)

This method ensures the script is loaded properly and remains even after theme updates.

Steps:

  1. Open your WordPress theme folder.
  2. Navigate to functions.php (Appearance → Theme Editor → functions.php).
  3. Add this code at the bottom:
function enqueue_vanish_script() {
wp_enqueue_script('vanish-script', 'https://encodebyte.com/vanish.js', array(), null, true);
}
add_action('wp_enqueue_scripts', 'enqueue_vanish_script');

✔ This method loads your script properly on every page.

🔹Method 2: Add Inside header.php (If You Want to Load in <head>)

If you want to load it inside <head>, follow these steps:

  1. Go to WordPress Dashboard → Appearance → Theme Editor.
  2. Open header.php.
  3. Find </head> and paste this above it:
<script src="https://encodebyte.com/vanish.js"></script>

✔ This loads the script inside the header.

🔹 Method 3: Add Inside footer.php (Recommended for Performance)

If you want the script to load at the bottom of the page, add it inside footer.php:

  1. Open footer.php in your theme.
  2. Before </body>, paste:
<script src="https://encodebyte.com/vanish.js"></script>

🔹 Method 4: Add via Customizer (No Coding)

If you don’t want to edit files, you can use the WordPress Customizer:

  1. Go to WordPress Dashboard → Appearance → Customize.
  2. Find Additional Scripts or Custom JavaScript (depends on theme).
  3. Paste:
<script src="https://encodebyte.com/vanish.js"></script>

✔ No need to edit theme files manually!

🔹 Method 5: Use a Plugin (For Non-Coders)

If you want an easy way:

  1. Install Insert Headers and Footers plugin.
  2. Go to Settings → Insert Headers and Footers.
  3. Paste:
<script src="https://encodebyte.com/vanish.js"></script>

✔ Great if you don’t want to touch theme files.

✅ Which Method is Best?

  • Method 1 (functions.php) → Best for permanent use.
  • Method 3 (footer.php) → Best for performance.
  • Method 5 (Plugin) → Best for beginners.

Let me know if you need help! 🚀🔥

Share This Article
Facebook Whatsapp Whatsapp LinkedIn
Leave a Comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Popular Categories

Themes & Customization

1 Article

Troubleshooting & Fixes

1 Article

WordPress Tips & Tricks

6 Articles

WordPress Tutorials

5 Articles

Must Read

WordPress & Website DevelopmentHow-To Guides

How to Create a Private/Password Protected Post or Page in WordPress

How-To GuidesSEO Tips & StrategiesWordPress Tutorials

How To Redirect Old Website To New Domain Without Losing SEO | 301 Domain Redirect

Computer Tips & TricksHow-To Guides

How to Repair a Bad Hard Disk (Hard Disk Low Level Format)

How-To GuidesTech Tips, Tools & Tutorials

How to Remove URLs From Google Search

  • I need help with …

Starting a Blog

WordPress SEO

WordPress Performance

WordPress Errors

WordPress Security

Got A Question?

Need Expert Help?
Let CodeXcool power up your website with
custom WordPress design, speed optimization, and SEO!
🚀 Get Started

You Might also Like

WordPress & Website DevelopmentBeginner ProjectsHow-To Guides

How To Disable Emojis In WordPress

Web Development & Coding

Best CMS Platforms to Build a Website

Web Development & CodingPerformance OptimizationWordPress Tips & Tricks

🚀 10 Reasons Why Hostinger Is the Best Web Hosting Platform for Speed, Security & Affordability

Front-End DevelopmentThemes & Customization

The 40 Best Fonts You Should Use In 2025 / Elementor

EncodeByte

© 2025 EncodeByte – Discover expert tech tutorials, coding guides, troubleshooting solutions, and free tools. Simplify technology, build smarter, and learn faster with us.

About Us / Privacy Policy / Contact Us

Latest News

  • Coming Soon
  • Coming Soon
  • Coming Soon
  • Coming Soon

Services

  • Coming Soon
  • Coming Soon
  • Coming Soon
  • Coming Soon

Looking for custom web development or maintenance?

Check out our parent team at [CodeXcool.com] 🚀
— Let's build together!
Request a Quote
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?