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 custom_customizer_styles() { | |
$custom_css = " | |
.preview-mobile #customize-preview iframe, | |
.preview-mobile .wp-full-overlay-main{ | |
width: 375px; | |
height: 667px; | |
} | |
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
/* | |
* ACF "repeat-horizontal" class, display repeaters in horizontal columns | |
*/ | |
.repeat-horizontal .acf-repeater tbody { | |
display: flex; | |
flex-direction: row; | |
flex-wrap: wrap; | |
} | |
/* Change flex-basis to like 20% if you want to limit number of items per row */ | |
.repeat-horizontal .acf-repeater tr.acf-row:not(.acf-clone) { |
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_render_module_content', function( $content, $module ) { | |
if ( $module instanceof FLRichTextModule && strstr( $content, '<!--more' ) ) { | |
$content = str_replace( '<div class="fl-rich-text">', '', $content ); | |
$content = preg_replace( '#</div>$#', '', $content ); | |
$parts = get_extended( $content ); | |
$main = balanceTags( $parts['main'], true ); | |
$main = preg_replace( '/<([^<\/>]*)>([\s]*?|(?R))<\/\1>/imsU', '', $main ); |
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_action('init', function() { | |
$post_type = get_post_type_object('post'); | |
if ($post_type) { | |
$labels = $post_type->labels; | |
$labels->name = 'Articles'; | |
$labels->singular_name = 'Article'; | |
$labels->add_new = 'Add Article'; |
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('perfmatters_preloads', function($preloads) { | |
if (function_exists('get_field') && isset($GLOBALS['post'])) { | |
$post = $GLOBALS['post']; | |
// Check hero_options - bail early if we're not using a hero image | |
$hero_options = get_field('hero_options', $post->ID); | |
if ($hero_options === 'hero-default' || $hero_options === 'hero-small') { | |
// Check for hero image override |
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
/* Floating Labels */ | |
.ff-el-group { | |
position: relative; | |
} | |
.ff-el-form-control::placeholder { | |
color: transparent !important; | |
} | |
.fluentform .ff-el-input--label { |
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
jQuery(document).ready(function($) { | |
// Add shadow class to containers and remove when you scroll to the bottom | |
const $recurringEventsLists = $('.recurring-events-list'); | |
function checkScrollAndHeight() { | |
const $this = $(this); | |
// Check if the content height is greater than the max-height of the container | |
if ($this.prop('scrollHeight') > $this.height()) { |
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
<div class="team-member wrapcenter"> | |
<div class="headshot-wrapper"> | |
<img class="team-headshot" src="[wpbb post:featured_image size='medium' display='url']"> | |
<!-- Button trigger modal --> | |
<button type="button" aria-label="Read more about [wpbb post:title]" class="modal-btn" data-toggle="modal" data-target="#[wpbb post:slug]"> | |
Learn More <span class="sr-only">about [wpbb post:title]</span> | |
</button> | |
</div> | |
<h3 class="team-name">[wpbb post:title]</h3> | |
<p class="team-position">[wpbb post:acf type='text' name='team_position']</p> |
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_shortcode( 'first_name', 'get_first_name' ); | |
function get_first_name() { | |
$title = get_the_title(); | |
$full_name_seperate = explode( ' ', $title ); | |
return $full_name_seperate[0]; | |
} |
NewerOlder