- Download this whole Gist as a zip and extract
- 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
- 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
- Paste the hero styles CSS (hero-styles.css) into wherever you are writing your CSS (styles.css, customizer, BB Global CSS, etc)
- 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
- Open the Themer Part with BB and edit the Row settings. For the Background Photo section, click on the wrench to set
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
WordCamp Lehigh Valley Website
August 19, 2017
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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; | |
} | |
NewerOlder