Skip to content

Instantly share code, notes, and snippets.

@cliffordp
cliffordp / script.js
Last active December 31, 2025 11:33 — forked from acoyfellow/example.html
GHL: Add meaningful page titles based on heading content so they're not all the same
<script>
// This script: https://gist.github.com/cliffordp/335bee91f59a49a378cdfd44bd8f510f
// Based on https://www.facebook.com/groups/gohighlevel/posts/2734386397020878 from Jordan Coeyman
// Install this (without this comment block) via "Custom JS": https://app.gohighlevel.com/settings/company?tab=whitelabel
(function() {
'use strict';
const POLL_INTERVAL = 2000;
@cliffordp
cliffordp / auto-open-ghl-chat-widget.js
Last active September 26, 2025 13:46
Automatically open (and keep open) the GoHighLevel chat widget
<script>
// For a HighLevel webpage (funnel or website) that is meant to be a dedicated chatting area.
// Copy all of this and paste into your custom code, such as in the Footer Tracking area.
// This snippet: https://gist.github.com/cliffordp/1428be81a842d5b93c793d2d5b967007
// Source demo: https://10xmarketing.ai/10x-chatbot-widget
function openChatWidget() {
// Check if Chat Widget exists.
if (window.leadConnector && window.leadConnector.chatWidget) {
// If it exists, open it.
window.leadConnector.chatWidget.openWidget();
@cliffordp
cliffordp / functions.php
Last active September 11, 2025 16:35
The Events Calendar: Change Event Archives' iCalendar export links to webcal://
<?php
/**
* The Events Calendar: Change Event Archives' iCalendar export links to webcal://
*
* This causes the "iCal Export" button to recommend to calendar applications
* (e.g. Apple, Outlook, etc.) that they should *subscribe* instead of *download*.
*
* We have to use JavaScript instead of PHP because the "Export Events"
* iCalendar link gets built via JS via
* /wp-content/plugins/the-events-calendar/src/resources/js/tribe-events.min.js
@cliffordp
cliffordp / 0-not-needed.txt
Last active August 20, 2025 22:57
Go High Level funnels and websites: replace/insert text of any `.replace_location` class with the `location` URL query parameter. Works in <head> or <body>.
I did not know at the time of writing this code and recording this video (https://www.youtube.com/watch?v=MHKzHf1BhrY) that THIS IS POSSIBLE NATIVELY FROM GHL, NO CUSTOM CODE NEEDED, NO CUSTOM VALUE NEEDED!
Please use GHL Native functionality as documented here: https://help.gohighlevel.com/support/solutions/articles/48001172004
@cliffordp
cliffordp / bypass-cloudflare-email-protection.js
Created February 16, 2024 16:31 — forked from neopunisher/bypass-cloudflare-email-protection.js
How to circumvent Cloudflare's [email protected] thing, WITHOUT enabling Javascript
// Adapted from https://raddle.me/f/Privacy/3722/how-to-circumvent-cloudflare-s-email-protected-thing-without with the help of chatGPT
function fixObfuscatedEmails() {
const elements = document.getElementsByClassName('__cf_email__');
for (let i = 0; i < elements.length; i++) {
const element = elements[i];
const obfuscatedEmail = element.getAttribute('data-cfemail');
if (obfuscatedEmail) {
const decodedEmail = decrypt(obfuscatedEmail);
element.setAttribute('href', 'mailto:' + decodedEmail);
element.innerHTML = decodedEmail;
@cliffordp
cliffordp / ghl-agency-menu-colors.css
Last active May 6, 2025 04:19
GoHighLevel Agency-Level Settings: Menu Colors
/**
* Source of this CSS code: https://gist.github.com/cliffordp/e95725bb9fd18eeeaf6c7d4766d18dcc
* Where to place this CSS code: https://app.gohighlevel.com/settings/company
*/
/* Agency */
.sidebar-v2-agency #sidebar-v2 .default-bg-color,
.sidebar-v2-agency #sidebar-v2.default-bg-color,
/* Locations */
.sidebar-v2-location #sidebar-v2 .default-bg-color,
@cliffordp
cliffordp / ghl-login-screen-full-customization.css
Last active April 30, 2025 04:05
GHL Login Screen custom CSS for AbleProApp
/**
* This code: https://gist.github.com/cliffordp/96aeba5b0348ec00f5eb4c4f48296272
* Modified from this source: https://www.facebook.com/groups/gohighlevel/permalink/2333866730406182/
*/
/* GHL Login Screen */
:root {
--main-body-bg: #fff;
--main-body-image: url(https://storage.googleapis.com/msgsndr/BNxDfo4mNns3odfcbYu9/media/66f4c4058fdba12698dd782f.png);
--main-login-bg: #fff;
@cliffordp
cliffordp / list-direct-message-spam-phrases.txt
Last active February 24, 2025 18:10
List of social media spam DM phrases for GHL workflow snapshot. See https://tourkick.com/?p=15216
======
Snapshot created with these on 2024-04-16
======
1k =
1k follower
1k=
about page restriction
account will be deactivated
are you interested to grow your
automatically disabled your ads
@cliffordp
cliffordp / functions.php
Last active February 10, 2025 21:18
Squirrly SEO: Custom Meta Robots for custom post type (CPT) archives
<?php
/*
* Squirrly SEO: Custom Meta Robots for custom post type (CPT) archives.
*
* Set `<meta name="robots" content="noindex,nofollow">` for WPAutoTerms archives (e.g. /terms page).
*
* Must be a priority AFTER 11 and BEFORE 99 due to the plugin's own use
* of this same filter hook in squirrly-seo/models/services/Noindex.php
*
* @link https://gist.github.com/cliffordp/f4ac939df52f1ba7f3120801eea43a32 This snippet.
@cliffordp
cliffordp / functions.php
Last active January 16, 2025 15:57
Override The Events Calendar's V2 Views from a custom plugin location
<?php
/**
* Add your own plugin as a template override location for The Events Calendar, Event Tickets, and related plugins. Only
* for TEC's V2 Views and ET's addons/overrides of TEC's V2 Views. Still need the old snippet for overriding ET's files.
*
* Each custom array's `path` is whatever you want it to be (i.e. customizable) up until the 'v2' part of each
* template's override path. We chose to keep it as `tribe/events` and `tribe/tickets` for simplicity.
* So if the TEC location for a view is:
* /wp-content/plugins/the-events-calendar/src/views/v2/list/event/featured-image.php
* Then this plugin's override location would be: