- 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
The Events Calendar Custom Fields @3.9 | |
Event Custom Post Type ( tribe_events ) | |
_EventAllDay | |
_EventStartDate | |
_EventEndDate | |
_EventDuration | |
_EventVenueID | |
_EventShowMapLink | |
_EventShowMap |
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 | |
// Creates New Nav/Menus | |
register_nav_menus( array( | |
'desktop_large' => 'Primary Large Desktop Menu', | |
'desktop_small' => 'Smaller Desktop Menu', | |
)); | |
// Places the HTML high up into the DOM |
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
<script> | |
var time = new Date(); | |
var dayOfWeek = time.getDay(); | |
// Set office opening time to 8:15am | |
var startTime = new Date().setHours(8,15); | |
// Set office closing time to 4:15pm | |
var endTime = new Date().setHours(16,15); | |
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
/** TABLE OF CONTENTS | |
---------------------------------------------------------------------------/ | |
1.0 - Global Styles | |
1.1 - General | |
1.2 - Selection Highlight | |
1.3 - Buttons | |
1.4 - Typography | |
1.5 - Custom Font Face |
You need a custom layout of images instead of an 'out of the box' gallery layout, but then you still want them clickable inside a lightbox with navigation buttons to go between images while staying inside the lightbox
Requirements:
- Put your photos in a container/row with ID of #gallery
- If you're using BB with photo modules, make sure Link Type is set to none in the module settings (not Lightbox)
- Have magnificPopup enqueued. If you're using BB Theme, you can enable it in Customizer > Content > Lightbox. If not, you can enqueue it yourself
- line 14 in the js is telling it to look at data-src to get the image URL - this is because I use lazy loading and this is where the URL is stored before loading. If you aren't using lazy loading, change line 14 to
item.src = item.el.attr('src');
Customize as you need: https://dimsemenov.com/plugins/magnific-popup/documentation.html#gallery
OlderNewer