Skip to content

Instantly share code, notes, and snippets.

View WayneStratton's full-sized avatar

Wayne WayneStratton

View GitHub Profile
@zackpyle
zackpyle / _Beaver-Themer-ACF-Hero.md
Last active May 18, 2023 13:56
Beaver Themer + ACF - Hero Section #beaverbuilder #beaverthemer

This is a download to make a Hero section on your pages using Beaver Themer and ACF.

- Steps to install -

  1. Download this whole Gist as a zip and extract
  2. Import the Hero Field Group (acf-hero-fields.json) into ACF (/wp-admin/edit.php?post_type=acf-field-group&page=acf-tools) - I like to exclude my Homepage for this fieldgroup as my homepage always has a custom hero section
  3. Paste the function for adding the body class (hero-bg-body-class.php) into your functions.php file or snippet plugin, leaving out the <?php at the beginning of the file
  4. Paste the hero styles CSS (hero-styles.css) into wherever you are writing your CSS (styles.css, customizer, BB Global CSS, etc)
  5. Use Wordpress importer (/wp-admin/import.php) to import the Themer Part (hero-themer-part.xml). Same as the ACF field group, I like to exclude my Homepage from this Themer Part as it always gets a custom hero
  6. Open the Themer Part with BB and edit the Row settings. For the Background Photo section, click on the wrench to set
@zackpyle
zackpyle / *Best Snippets*
Last active May 1, 2024 20:05
Best PHP/JS Snippets
This is a collection of my most used or most useful PHP and JS snippets
**Disclaimer, I didn't write most of these - I just curated them over the years**
@carlosonweb
carlosonweb / bb-themer-sticky-topbar.js
Last active March 2, 2018 04:39
How to make a sticky Topbar in Beaver Themer.
/**
* First, you need to setup this CSS
*******************************************
.fl-sticky {
position: fixed !important;
width: 100% !important;
left: 0 !important;
top: 0 !important;
z-index: 9999 !important;
border-top: 0 !important;
@tlctara
tlctara / Beaver Builder Mega Menu Integration CSS Example
Last active May 8, 2020 15:43
CSS to customize Beaver Builder Mega Menu with columns as sub pages, images and intro text
/* This code hides the column headers when they are a sub-menu item */
.fl-menu .sub-menu .fl-has-submenu-container {
display:none;
}
/* This code styles the images and intro text in the mega menu */
.menu-image a {
visibility: hidden;
margin-top: -20px!important;
}
@neilgee
neilgee / bb.css
Last active May 29, 2018 22:25
Beaver Builder CSS Snippets
/* Content Slider
* Set Opacity Bg on text 100% wide to overlay image - then position text with fl-slide-title and fl-slide-text
---------------------------------------------------------------------------------------------------- */
@media (min-width:768px) {
.hero-slider-row .fl-slide-2 .fl-slide-title,
.hero-slider-row .fl-slide-2 .fl-slide-text {
width: 65%;
margin: 0 auto !important;
}
@seothemes
seothemes / page-builder.php
Created May 22, 2017 04:20
Genesis page template for Beaver Builder.
<?php
/**
* Template Name: Page Builder
*
* This file adds the page builder template to the Genesis Starter theme.
* It removes everything in between the header and footer leaving
* a blank template that is compatibale with page builder plugins.
*
* @package GenesisStarter
* @link https://seothemes.net/genesis-starter
@psahalot
psahalot / beaver-button-styles.css
Created May 17, 2017 08:05
Beaver Builder Button Styles
.bb-custom-button-1 {
letter-spacing: 2px;
}
.bb-custom-button-1 a.fl-button {
border-width: 3px !important;
}
.bb-custom-button-1 a.fl-button:hover {
background-color: transparent !important;
@salcode
salcode / 2017-nearby-wordcamps.md
Last active October 5, 2017 22:45
2017 WordCamps Near Me
@blogjunkie
blogjunkie / functions.php
Last active March 24, 2020 09:02
Define defaults for Beaver Builder button module Link: https://pro.wpbeaverworld.com/add-default-colors-button-module/
<?php
add_filter( 'fl_builder_settings_form_defaults', 'wpbw_default_color_button_module', 20, 2 );
function wpbw_default_color_button_module( $defaults, $type )
{
if( $type == "button-module" )
{
$defaults->bg_color = "f59120";
$defaults->bg_hover_color = "808080";
$defaults->text_color = "ffffff";
<?php
function smyles_custom_listify_listing_data( $data ) {
// Set price key to value from get_custom_field (if there is a value).
// This will allow you to use {{{ data.price }}} in /templates/tmpl-map-popup.php file
if( $price = get_custom_field( 'price', $data['id'] ) ){
$data[ 'price' ] = $price;
}