Skip to content

Instantly share code, notes, and snippets.

View reidelliott's full-sized avatar

Reid Burnett reidelliott

View GitHub Profile
@reidelliott
reidelliott / _carousel-fade.scss
Created March 30, 2016 03:44
Bootstrap Carousel Fade
<div class="carousel-inner" role="listbox">
<?php
$i = 0; while ( $web_loop->have_posts() ) : $web_loop->the_post();
$count = $web_loop->post_count;
// $link = get_field('link');
if ( has_post_thumbnail() ) {
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'medium' );
}
?>
<?php if ($i%15==0) { ?>
@reidelliott
reidelliott / bs4-embed
Created October 11, 2017 18:12
Bootstrap 4 16x9 Embed
<div class="embed-responsive embed-responsive-16by9 my-4">
<iframe class="embed-responsive-item" src="https://www.youtube.com/embed/zpOULjyy-n8?rel=0" allowfullscreen></iframe>
</div>
@reidelliott
reidelliott / gdlc-button-shortcode
Last active October 15, 2017 06:03
GDLC Button Shortcode
[button href="#"]Serve our Church[/button]
@reidelliott
reidelliott / wp-social-share.php
Last active June 7, 2021 21:07
Function for social share links in WP using Font Awesome icons
/**
* Share Links
*/
function share_links() {
$home_url = esc_url( home_url( '/') );
$slug = basename( get_permalink() );
?>
<div class="share-links-container align-middle">
<ul class="share-links list-unstyled text-center text-sm-right mt-3 mb-3 mb-sm-0">
<li class="linkedin list-inline-item">
@reidelliott
reidelliott / Social Brand Colors
Last active March 22, 2018 21:22
A list of sass variables for social media brands
```
$twitter: #00aced;
$facebook: #3b5998;
$googleplus: #dd4b39;
$pinterest: #cb2027;
$linkedin: #007bb6;
$youtube: #b00;
$vimeo: #aad450;
$tumblr: #32506d;
/**
* Removes the "Archive" prepending category and custom post type archives
* @author Reid Burnett
*/
add_filter( 'get_the_archive_title', function ($title) {
if ( is_category() ) {
$title = single_cat_title( '', false );
} elseif ( is_tag() ) {
$title = single_tag_title( '', false );
}
@reidelliott
reidelliott / sage9-favicons.blade.php
Created April 18, 2018 16:50
Sage 9 Favicon Stack
<link rel="apple-touch-icon-precomposed" sizes="57x57" href="@asset('images/apple-touch-icon-57x57.png')" />
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="@asset('images/apple-touch-icon-114x114.png')" />
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="@asset('images/apple-touch-icon-72x72.png')" />
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="@asset('images/apple-touch-icon-144x144.png')" />
<link rel="apple-touch-icon-precomposed" sizes="60x60" href="@asset('images/apple-touch-icon-60x60.png')" />
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="@asset('images/apple-touch-icon-120x120.png')" />
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="@asset('images/apple-touch-icon-76x76.png')" />
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="@asset('images/apple-touch-icon-152x152.png')" />
<link rel="icon" type="image/png" href="@asset('images/favicon-196x196.png')" sizes="196x196" />
<link rel="icon" ty
<!doctype html>
<!-- Bootstrap Under Construction Boilerplate -->
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!-- Consider adding a manifest.appcache: h5bp.com/d/Offline -->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="en">
<!--<![endif]-->
/**
* Fix location of ACF local JSON.
*
* Since Sage does some surgery on the WordPress template locations, ACF looks in
* the wrong location for the acf-json directory. We will fix this by manually
* hooking into that functionality and attempting to save in the right spot.
*
* @param string $path
* @return string
*/