Skip to content

Instantly share code, notes, and snippets.

Avatar

Paul Lacey paullacey78

View GitHub Profile
View generatepress-customizer-colors.php
<?php
add_filter( 'generate_default_color_palettes', 'tu_custom_color_palettes' );
function tu_custom_color_palettes( $palettes ) {
$palettes = array(
get_field( "brand_primary" ),
get_field( "brand_secondary" ),
get_field( "brand_buttons" )
get_field( "brand_text" )
);
View bb-bits.css
/* ## REMOVE MARGIN-BOTTOM FOR LAST CHILD ## */
.fl-rich-text p:last-child{
margin-bottom: 0 !important;
}
/*#######################################################*/
/* ## SET MAXIMUN WIDTH FOR ROWS CONTENT ## */
@media only screen and (max-width: 992px) {
View bb-shape-fixer
/* Add the class bb-shape to the Beaver Builder row and then add this css to wherever you put your css */
.bb-shape .fl-row-content-wrap:after {
border-bottom: 1px solid #fff;
}
View woocommerce-re-order-countries.php
<?php
/*
* Woocommerce Push UK & USA to the top of the country list
*/
add_filter('woocommerce_sort_countries', '__return_false');
add_filter( 'woocommerce_countries', 'change_country_order_in_checkout_form' );
function change_country_order_in_checkout_form($countries)
{
$uk = $countries['GB']; // Store the data for "UK key
View nhl.css
.wp-custom-logo .title-area {
max-width: 320px;
}
ul.menu-primary.genesis-nav-menu li {
margin-left: 0;
}
ul.menu-primary.genesis-nav-menu li {
border-radius: 5px;
}
View bb-buttons.css
a.fl-button,
a.fl-button:visited,
.fl-builder-content a.fl-button,
.fl-builder-content a.fl-button:visited {
background: red;
border: 1px solid red;
border-radius: 20px;
}
a.fl-button *,
a.fl-button:visited *,
View nice-shortcod.css
.fl-builder-module-template {
padding: 0;
}
View simple-js-toggle.js
function classToggle() {
this.classList.toggle('class1');
this.classList.toggle('class2');
}
document.querySelector('#div').addEventListener('click', classToggle);
View cool-links.css
View generatepress-responsive-header.css
/* # GENERATEPRESS HEADER # */
/* GeneratePress header fix for phablets & small tablets
Change the 1024px value in two places to where you have nav/logo overlap */
@media(min-width: 841px) {
.inside-header {
display: flex;
align-items: center;
}
.site-logo {
width: 20%;