Skip to content

Instantly share code, notes, and snippets.

View TwisterMc's full-sized avatar

Thomas McMahon TwisterMc

View GitHub Profile
@TwisterMc
TwisterMc / bb-align-uabb-info-banner.css
Last active April 13, 2018 19:16
Align UABB Module: Info Banner
/* ---------------------------------------------------------------------
Module: UABB Info Banner
Requirement: You must have equal column heights.
Requirement: Should not have a height set in the individual modules.
------------------------------------------------------------------------ */
.fl-module-info-banner {
display: flex;
height: 100%;
}
@TwisterMc
TwisterMc / bb-align-callout.css
Created April 13, 2018 19:04
Align Beaver Builder Module: Callout
/* ---------------------------------------------------------------------
Module: Callout
Requirement: You must have equal column heights.
------------------------------------------------------------------------ */
.fl-module-callout {
display: flex;
height: 100%;
}
@TwisterMc
TwisterMc / bb-align-cta.css
Created April 13, 2018 19:03
Align Beaver Builder Module: Call to Action
/* ---------------------------------------------------------------------
Module: Call to Action
Requirement: You must have equal column heights.
Requirement: Button layout must be stacked.
------------------------------------------------------------------------ */
.fl-module-cta {
display: flex;
height: 100%;
}
@TwisterMc
TwisterMc / common.css
Created August 23, 2017 12:12
Vivaldi Tab Loading Indicator
/* append this to the bottom of the common.css file */
/* via https://forum.vivaldi.net/topic/6289/tab-loading-indicator/24?page=2 */
@keyframes fade{
from {opacity:1}
to {opacity:0.4}
}
/* Either pulse the "X"... */
.button-toolbar.reload.loading svg{
animation-name: fade;
animation-duration: 400ms;
@TwisterMc
TwisterMc / beaver-builder-logo.php
Last active June 11, 2020 15:19
Customize the WordPress login screen with the logo uploaded to Beaver Builder
<?php
/**
* Add Beaver Builder logo to login screen.
*
* @action login_enqueue_scripts
*/
function nerd_login_logo() {
$logo_image = get_theme_mod( 'fl-logo-image-retina' );
@TwisterMc
TwisterMc / walker.php
Created February 24, 2017 02:13
WordPress Walker Code
<?php
/* I'm not so certain this works right anymore, but some may find it useful. See https://www.twistermc.com/36600/wordpress-mega-menu/ for full details. */
class description_walker extends Walker_Nav_Menu {
protected $topLevelId = NULL;
protected $topLevelCount = NULL;
protected $templateURL = NULL;
function description_walker() {
$this->templateURL = get_theme_root() . '/' . get_template() . '/';
@TwisterMc
TwisterMc / contributor-upload.php
Created February 24, 2017 01:57
Allow the WordPress Contributor role to upload files.
<?php
/**
* Allow the Contributor role to upload files.
*/
function add_theme_caps() {
$role = get_role( 'contributor' );
$role->add_cap( 'upload_files' );
}
add_action( 'admin_init', 'add_theme_caps');
@TwisterMc
TwisterMc / bb-search.php
Last active November 10, 2019 21:44
Beaver Builder - Add Search to Mobile
<?php
/**
* Add Search Box to Mobile
* Adds a search box to mobile, below the header.
* To move it above the header, change fl_after_header to fl_before_header
*/
function bbMenuPolish_addMobileSearch(){
if ( wp_is_mobile() ) {
get_search_form();
}
@TwisterMc
TwisterMc / bb-ddm.css
Last active October 28, 2017 17:05
Beaver Builder Drop Down Menu Indicators
/* add the drop down indicator to parent */
.fl-page-header .menu-item-has-children a:after {content: " ▾"; }
/* remove drop down indicator from children */
.fl-page-header .sub-menu a:after {content: ""; }
@TwisterMc
TwisterMc / beaverbuilder-jump-links.js
Created February 16, 2017 21:41
Make jump links between pages work better when there is a fixed header.