Skip to content

Instantly share code, notes, and snippets.

@conorseed
conorseed / functions.php
Created November 20, 2024 22:45
Themeco Cornerstone / Pro Theme - Disable Image Lazy Load
<?php
/*
* Disable lazy loading for Cornerstone image elements
* ===== 1. Add this code to functions.php in your child theme
* ===== (see here: https://theme.co/docs/child-themes)
* ===== 2. Add 'x-no-lazy' class to any image element
* ===== OR to any parent element and all image elements within the parent
* ===== (including background image elements) will no longer be lazy loaded
*/
<?php
/*
** CUSTOM LOOPER FOR PRO THEME
** 1. Set "Looper Provider" as "Custom" and the hook as "get_my_query"
** 2. Add below function to functions.php in child theme
** 3. Set Params via JSON in Pro. Takes "post_type" and "tax_query" in format here:
{
"post_type": ["post", "tv_show"],
"tax_query": {
@conorseed
conorseed / christianmemes.css
Last active August 19, 2017 07:38
Custom CSS for Christian Meme's Shopify Store - Single Post
/* SINGLE BLOG POST */
#relatedblogs h3 {
font-size: 150%;
font-weight: 900;
text-transform: uppercase;
font-family: Geogrotesque-Semibold, Helvetica, Arial, sans-serif;
margin-bottom: 20px;
}
div#relatedblogs {
@conorseed
conorseed / xpro_smoothscroll.js
Created May 9, 2017 04:06
X Pro -> Smooth Scroll for Internal Links workaround
// handle links with @href started with '#' only
jQuery(function($){
$(document).on('click', 'a[href^="#"]', function(e) {
// target element id
var id = $(this).attr('href');
// target element
var $id = $(id);
if ($id.length === 0) {