How Do I Add a Floating Banner in WordPress?
on 25 August, 2022
No Comments
Adding a floating banner in WordPress is fairly simple. You will first need to create a new file called “ style.
css ” in your WordPress theme folder. In this file, you will need to add the following code:.header-banner { position: fixed; top:0; left:0; z-index: 1000000; }
Next, you will need to add a reference to this file in your WordPress theme’s “header.php” file. This can be done by adding the following line:
require_once ‘./style.css';
Finally, you will need to add a class to the
Your finished banner code should look something like this:
Finally, you will need to add a link to your banner in your WordPress site’s footer. To do this, add the following line to your theme’s