Skip to content

Instantly share code, notes, and snippets.

View ckschmieder's full-sized avatar

Chris Schmieder ckschmieder

View GitHub Profile
$('.slick-slider').on('beforeChange', function(event, slick, currentSlide, nextSlide){
$( '#click-to-scroll').removeClass( "d-none" );
if ( $('.slick-slide.slick-current.slick-active .hero-carousel__item').attr('data-scroll-to') == '' ) {
console.log("no data set");
$( '#click-to-scroll').addClass( "d-none" );
} else {
console.log("data was found");
}
});
<?php
/**
* The header for our theme.
*
* Displays all of the <head> section and everything up till <div id="content">
*
* @package storefront
*/
?><!doctype html>
h1 {
font-family: 'MuseoSans-700', arial, helvetica, sans-serif;
color: white!important;
}
h2 {
font-size: 1.625em;
font-family: 'MuseoSans-700', arial, helvetica, sans-serif;
}
h3 {
@ckschmieder
ckschmieder / no-comments.php
Last active January 14, 2023 17:26 — forked from mattclements/function.php
Wordpress Disable Comments (add to function.php)
<?php
// Add to existing function.php file
// Disable support for comments and trackbacks in post types
function df_disable_comments_post_types_support() {
$post_types = get_post_types();
foreach ($post_types as $post_type) {
if(post_type_supports($post_type, 'comments')) {
remove_post_type_support($post_type, 'comments');
@ckschmieder
ckschmieder / picatinny-ada-aa-2-4-7-focus.css
Created October 24, 2018 15:36
Code to help meet AA standard 2.4.7 should it be needed
:focus {
outline: -webkit-focus-ring-color auto 5px;
}
a[href]:focus, a[href]:hover {
background: #f8f8f8;
background: rgba(75%, 75%, 75%, .25);
border-bottom-width: 3px;
margin-bottom: -2px;
}
@ckschmieder
ckschmieder / sidebar-footer.php
Created April 14, 2018 05:57
CB NEW HOMES - add file to there directory
@ckschmieder
ckschmieder / functions.php
Created April 14, 2018 05:55
CB NEW HOMES - added register sidebar for footer around line 137
/**
* Register widget area.
*
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
*/
function cbnewhomes2018_widgets_init() {
register_sidebar( array(
'name' => esc_html__( 'Sidebar', 'cbnewhomes2018' ),
'id' => 'sidebar-1',
'description' => esc_html__( 'Add widgets here.', 'cbnewhomes2018' ),
@ckschmieder
ckschmieder / asynchronous.php
Created February 16, 2018 02:40
Have a WordPress site with some render blocking JavaScript? Are you using a plugin like Autoptimize that can’t aggregate/concatenate and therefore cannot defer external, 3rd-party JavaScript? Eliminate it with this code snippet for better real world performance and better grades on tools like PageSpeed Insights! Copy and paste this code snippet …
/*Function to defer or asynchronously load scripts*/
function js_async_attr($tag){
# Do not add defer or async attribute to these scripts
$scripts_to_exclude = array('script1.js', 'script2.js', 'script3.js');
foreach($scripts_to_exclude as $exclude_script){
if(true == strpos($tag, $exclude_script ) )
return $tag;
}
.inner-wrap {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-flow: row wrap;
flex-flow: row wrap;
}
.inner {
@ckschmieder
ckschmieder / mguzy.html
Last active November 22, 2017 00:42
If you're looking for the body, it's from lines 9 - 49.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Email</title>
</head>
<!-- The body starts on the next line and ends on line 49. Copy everything between these comments (lines 9 - 49) -->
<body style="padding:0px;margin:0px;">
<table width="600" border="0" cellspacing="0" cellpadding="0">