Skip to content

Instantly share code, notes, and snippets.

Avatar

Thomas McMahon TwisterMc

View GitHub Profile
@TwisterMc
TwisterMc / bb-align-uabb-info-banner.css
Last active Apr 13, 2018
Align UABB Module: Info Banner
View bb-align-uabb-info-banner.css
/* ---------------------------------------------------------------------
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 Apr 13, 2018
Align Beaver Builder Module: Callout
View bb-align-callout.css
/* ---------------------------------------------------------------------
Module: Callout
Requirement: You must have equal column heights.
------------------------------------------------------------------------ */
.fl-module-callout {
display: flex;
height: 100%;
}
@TwisterMc
TwisterMc / bb-align-cta.css
Created Apr 13, 2018
Align Beaver Builder Module: Call to Action
View bb-align-cta.css
/* ---------------------------------------------------------------------
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 Aug 23, 2017
Vivaldi Tab Loading Indicator
View common.css
/* 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 Jun 11, 2020
Customize the WordPress login screen with the logo uploaded to Beaver Builder
View beaver-builder-logo.php
<?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 Feb 24, 2017
WordPress Walker Code
View walker.php
<?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 Feb 24, 2017
Allow the WordPress Contributor role to upload files.
View contributor-upload.php
<?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 Nov 10, 2019
Beaver Builder - Add Search to Mobile
View bb-search.php
<?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 Oct 28, 2017
Beaver Builder Drop Down Menu Indicators
View bb-ddm.css
/* 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 Feb 16, 2017
Make jump links between pages work better when there is a fixed header.
View beaverbuilder-jump-links.js