SC Fuels had two cookie consent banners, and the client was concerned this was affecting their data. One of the cookie banners was OneTrust, which we’re familiar with and knew where to find. The other was more mysterious. No one knew where it had come from or to what platform it belonged.
![]()
The first thing I noticed about the banner was that its CSS style was inline, which indicated to me that whatever was responsible for this banner was making something bespoke, and wasn’t likely to have been built by the client (or us, since we tend to shy away from inline CSS where possible). More importantly, because the banner CSS was inline, it was likely that the entire code could be found in one place (rather than across multiple scripts), so it would be easy to search for certain key phrases or lines.
I wasn’t able to locate the banner code in Chrome DevTools or Google Tag Manager, which ruled off a lot of ways to add it to the site via third-party scripts. This told me the banner was probably in the WordPress code somewhere, confirming my fellow developers’ and the client’s suspicions. I briefly thought about going through the WordPress plugins one by one to hunt it down, when I realized there was a much faster way to look.
Luckily, we had cPanel access for this client, and often with cPanel access comes terminal access. A terminal grants an extremely easy way to search an entire WordPress codebase for a few lines, using a Unix tool called grep. (If you’re not familiar with grep, I’d strongly encourage you to learn about it. Here’s a basic overview and here’s a cheat sheet.) I ran a grep search on some of the bespoke CSS and very quickly came up with a result in the settings of a custom JS/CSS plugin, in whose settings I was easily able to disable and delete the offending code.
Interactive team members are by and large cozy with grep, and even though we don’t always have as much of a reason to enter cPanel/etc., it’s as much worth learning as vim for those sticky situations when another way just won’t do.
Found and removed a cookie consent banner that was difficult to find, and whose origin was unknown.