Skip to content

Instantly share code, notes, and snippets.

View cliffordp's full-sized avatar

Clifford cliffordp

View GitHub Profile
@cliffordp
cliffordp / redirec-search-to-list-tec.php
Last active April 19, 2024 03:49 — forked from BeardedGinger/redirec-search-to-list-tec.php
TEC | Force list view for search results
<?php
// Force list view for search results
// updated to the code provided by a forum user at https://theeventscalendar.com/support/forums/topic/forcing-list-view-for-search-results/#post-1259085
// UNTESTED!
// from https://gist.github.com/cliffordp/a473ccda4308acb9ac66499de5407c9b
add_action( 'wp_footer', function () {
// If tribe-events.js hasn't been setup, do nothing
if ( ! wp_script_is( 'tribe-events-calendar-script' ) ) {
return;
}
@cliffordp
cliffordp / auto-open-ghl-chat-widget.js
Last active April 18, 2024 02:18
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();
1k =
1k follower
1k=
about page restriction
account will be deactivated
are you interested to grow your
automatically disabled your ads
block your account automatically
breached our copyright policy
cash app tag
@cliffordp
cliffordp / functions.php
Last active March 14, 2024 17:27
Shortcode: [copythis] write to clipboard
<?php
// [copythis]This will be copied[/copythis]
// @link https://gist.github.com/cliffordp/fe86cc09d5c6250453fc4c8ccf763e5b This snippet.
add_shortcode( 'copythis', function( $atts, $content = null ) {
return sprintf(
'<div class="copythis">%s</div>
<button onclick="navigator.clipboard.writeText(this.previousElementSibling.textContent)">Copy This</button>',
$content);
});
@cliffordp
cliffordp / ghl-custom-css-via-custom-values.css
Last active February 26, 2024 21:41
GHL website custom CSS via Custom Values
<style>
/* Video: https://youtu.be/u39v1o6iqc0 */
/* Code Source: https://gist.github.com/cliffordp/95dd05de071dd8f8ce0c73625ff7106d */
/* Buttons */
div[class*='button-'] a[class*='btn-'] {
background-color: {{custom_values.color_secondary}};
}
/* H1s */
// UNNECESSARY. DO NOT USE.
// Do this instead: https://help.gohighlevel.com/support/solutions/articles/48001172004
<script id="bizname-enforce-default-url-query-param">
// Source: https://gist.github.com/cliffordp/f4aa43badd4d99cee537a82ff0e5ab3b
// Video: https://youtu.be/MHKzHf1BhrY
// Function to check for the 'bizname' query parameter and redirect if not present.
(function enforceDefaultBiznameQueryParam() {
const urlParams = new URLSearchParams(window.location.search);
const bizname = urlParams.get('bizname');
@cliffordp
cliffordp / functions.php
Last active February 20, 2024 13:36
The Events Calendar - Get the next upcoming Featured Event
<?php
/**
* The Events Calendar - Get the next upcoming Featured Event
*
* Notes:
* 1) Ignores all-day events.
* 2) For the date comparison, this code assumes each event is in
* the same timezone as your WordPress General Settings timezone.
*
@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 January 3, 2024 17:41
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 / bulk-transfer-gh-issues.sh
Created December 30, 2023 17:25 — forked from slaFFik/bulk-transfer-gh-issues.sh
Open local repo to bulk transfer all its issues to a new repo: https://jloh.co/posts/bulk-migrate-issues-github-cli/
gh issue list -s all -L 500 --json number | \
jq -r '.[] | .number' | \
xargs -I% gh issue transfer % https://github.com/<destination repo>