Skip to content

Instantly share code, notes, and snippets.

View nomad411's full-sized avatar
🎓
Living la vida mocha!

Gérard Godin nomad411

🎓
Living la vida mocha!
  • GetGo Internet Coaching
View GitHub Profile
@Kevin-LeMasters-PixelParade
Kevin-LeMasters-PixelParade / _BeaverBuilder-Scrollspy-Bootstrap.md
Last active April 16, 2024 12:49
Easy Scrollspy setup for BB theme users running full Bootstrap 4 or anyone using Bootstrap 4 with/without BB

Easy Scrollspy setup for BB theme users running full Bootstrap 4 or anyone using Bootstrap 4 with BB.

For BB theme, enable full bootstrap 4 under customize > General > Layout (Or load it from CDN on a single page if not using it sitewide)

JS file add to BB page JS directly or load via external file in footer defered.

Currently using it with PowerPack's Table of Contents module, but this could be used for any list/menu of links, just change the data-target attribute.

I referred to this documentation when setting up

@Pross
Pross / functions.php
Created November 17, 2023 17:45
Show hook location with fl_hooks $_GET is used in Beaver Builder
<php
/**
* Show hook location with fl_hooks $_GET is used.
*/
add_action( 'template_redirect', function() {
if ( ! isset( $_REQUEST['fl_hooks'] ) ) {
return false;
}
@zackpyle
zackpyle / scroll-down-button.js
Created March 28, 2023 13:45
A Button that scrolls the page down from section to section smoothly
// A Button that scrolls the page down from section to section smoothly
// Button needs to be positioned absolutely and design using css or a builder
// Here is the demo of this button in use https://youtu.be/_JZ9k0kT7yY?t=382
// Borrowed from https://github.com/thisbit/github_snippets/blob/main/js/scroll-down-button.js and converted to jQuery
jQuery(document).ready(function($) {
const $button = $('.carret-down');
const $sections = $('.custom-section');
function* goToNextSection(event) {
.fl-builder-content .fill .fl-button-wrap a.fl-button,
.fl-builder-content .fill-outline .fl-button-group-button:nth-child(1) .fl-button-wrap a.fl-button,
.fl-builder-content .outline-fill .fl-button-group-button:nth-child(2) .fl-button-wrap a.fl-button {
font-family: var(--buttonFontFamily,var(--fontFamily));
font-size: var(--buttonFontSize);
font-weight: var(--buttonFontWeight);
font-style: var(--buttonFontStyle);
letter-spacing: var(--buttonLetterSpacing);
text-transform: var(--buttonTextTransform);
-webkit-text-decoration: var(--buttonTextDecoration);
@VR51
VR51 / php-error.php
Last active October 11, 2023 10:14
WordPress Custom PHP Error Report
<?php
header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Status: 503 Service Temporarily Unavailable');
header('Retry-After: 60'); // 1 hour = 3600 seconds
/**
* WordPress Custom PHP Error Report
*
* Drop this file into wp-content.
* When a PHP error occurs a stacktrace will be sent to the email address congifured below here.
@zackpyle
zackpyle / styles.css
Last active February 28, 2023 18:57
Starter CSS
/** TABLE OF CONTENTS
---------------------------------------------------------------------------/
1.0 - Global Styles
1.1 - General
1.2 - Selection Highlight
1.3 - Buttons
1.4 - Typography
1.5 - Custom Font Face
@neilgee
neilgee / runcloud-beaver-buster.php
Last active December 19, 2021 13:55
Purge RunCloud Cache On Extra Beaver Hooks
<?php
/**
* Plugin Name: Runcloud BeaverCache Purge Helper
* Plugin URI: https://gist.github.com/neilgee/4a251b24f65a70849ab122afa6dfac0fp
* Description: Adding additional hooks to trigger RunCloud or lscache plugin purges
* Version: 0.1
* Author: Paul Stoute, Jordan Trask, Jeff Cleverly, Neil Gowran
* Author URI: https://github.com/jordantrizz/cache-purge-helper
* Text Domain: runcloud-beaver-cache-purge-helper
@Pross
Pross / bb-cleanup.php
Created September 1, 2021 18:30
Mini plugin for Beaver Builder that clears all history states and draft data weekly for people on crippled potato hosting.
<?php
/*
Plugin Name: Beaver Builder Cleanup Tool
Description: Clears temporary data weekly
Author: <Simon>
Version: 1.0
*/
class BB_Cleanup {
protected $seconds = 604800; // Weekly.
function __construct() {
@Pross
Pross / functions.php
Created July 29, 2021 17:57
Random row animations
<?php
add_filter( 'fl_builder_node_settings', function( $settings, $node ) {
if ( 'module' === $node->type ) {
$animations = array(
'fade-in',
'fade-left',
'fade-right',
'fade-up',