Skip to content

Instantly share code, notes, and snippets.

Zoe Rooney zoerooney

Block or report user

Report or block zoerooney

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@zoerooney
zoerooney / breadcrumbs.liquid
Last active Sep 7, 2016
Shopify product breadcrumbs showing tag-based subcategories. Full tutorial here: http://zoerooney.com/blog/tutorials/shopify-product-breadcrumbs-with-tag-support/
View breadcrumbs.liquid
<div class="breadcrumbs">
<a href="/" class="homepage-link">Home</a>
{% if collection.handle %}
&gt;
{% capture url %}/collections/{{ collection.handle }}{% endcapture %}
<a href="{{ collection.url }}" class="collection-link">{{ collection.title }}</a>
{% endif %}
<span class="bc-tags"></span><!-- this is a placeholder for the tag if there is one -->
</div> <!-- end .breadcrumbs -->
View feed-example.html
<div id="pinfeed"></div>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<!-- ref: https://developers.google.com/feed/v1/devguide -->
<script type="text/javascript">
google.load('feeds', '1');
function initialize() {
@zoerooney
zoerooney / jquery.js
Last active Nov 23, 2018
Shopify minicart on non-Shopify site
View jquery.js
<script>
jQuery.ajax({
type: 'GET',
url: 'http://mysite.myshopify.com/cart.json',
dataType: 'jsonp',
success: function(data) {
var item_count = data['item_count'];
var total_price = data['total_price']/100;
//If there are items in cart
@zoerooney
zoerooney / tweet-quicktag.php
Last active Jul 9, 2016
Code to add inline click-to-tweet links in WordPress while using the text editor. Full tutorial here: http://zoerooney.com/blog/tutorials/inline-click-to-tweet-functionality/
View tweet-quicktag.php
function add_tweet_quicktag(){ ?>
<script>
// create a new quicktag button labeled "tweet"
QTags.addButton( 'quicktweet', 'tweet', selection_callback );
// on click, it triggers this callback:
function selection_callback(e, c, ed) {
// we want to grab the selected text and we're going to get a URL as well
var selection, postURL, t = this;
@zoerooney
zoerooney / page-gallery.php
Last active Jan 29, 2019
Gallery page using ACF PRO with a dynamically generated zip file download of all gallery images. More info/ tutorial here: http://zoerooney.com/blog/tutorials/wordpress-gallery-with-automated-zip-file-download/
View page-gallery.php
@zoerooney
zoerooney / page-directory.liquid
Last active Aug 29, 2015
Directory using Shopify blog content, sorted by title, with in-page quick search. As seen on: http://afavoritedesign.com/pages/the-peddlers with a full tutorial here: http://zoerooney.com/blog/tutorials/shopify-alphabetical-searchable-directory-page/
View page-directory.liquid
<header class="page-title">
<h1>{{ page.title }}</h1>
</header>
<section id="content">
<div class="search-area">
<div class="left">{{ page.content }}</div>
<div class="right"><form><i class="icon-search"></i><input type="text" id="peddler-search" placeholder="type your city, state or postal code"></form></div>
</div>
<div class="locations">
{% assign sorted_articles = blogs.peddlers.articles | sort: 'title' %}
View instagram.php
<div id="instagram" class="widget">
<?php
// Set variables
$image_number = 2;
$image_size = 'low_resolution'; //options: low_resolution (306), thumbnail (150), standard_resolution (612)
// Create the API URL for the user data
$user_access_token = '123456.xxxxxxxx.zzzzzzzzzzzzzzzzzzzzzzz';
$user_data_url = 'https://api.instagram.com/v1/users/self/?access_token=' . $user_access_token;
@zoerooney
zoerooney / page-shopify.php
Last active Mar 18, 2019
Shopify Collection Embedded in WordPress
View page-shopify.php
<?php
/**
* Template Name: Shopify Collection Demo
*
*/
get_header(); ?>
<div id="primary" class="full-width">
@zoerooney
zoerooney / markup.html
Created Aug 8, 2014
Instafeed with links opening in new window
View markup.html
<div id="instafeed"></div>
<script>
var feed = new Instafeed({
clientId: 'XXXXXXXXXXXXXXXXXX',
accessToken: 'abcdefghijklmnop',
get: 'user',
userId: 12345678,
limit: 5,
after: function() {
external();
@zoerooney
zoerooney / header-for-most-emails.html
Last active Aug 1, 2018
Shopify notification emails, bettered. I usually use the first one as the header for all the emails other than the ones with specific template code below. Be sure to put the correct logo dimensions in place in each snippet before using it!
View header-for-most-emails.html
<div style="width: 100%; margin: 0 auto; text-align: center; background: #ffffff;">
<a href="{{ shop.url }}"><img src="{{ 'logo.png' | asset_url }}" alt="{{ shop_name }}" width="WIDTH" height="HEIGHT" style="margin: 0 auto;" /></a>
<br/><br/>
</div>
You can’t perform that action at this time.