Skip to content

Instantly share code, notes, and snippets.

@hborrelli1
hborrelli1 / bottle-counter.html
Last active January 30, 2018 01:01
Bottle Counter
<!DOCTYPE html>
<html>
<body>
<p id="startDate"></p>
<p id="currentDate"></p>
<p id="difference"></p>
<p id="days"></p>
<p id="minutes"></p>
<p id="minSimplified"></p>
@hborrelli1
hborrelli1 / gist:e5392f84b9fdc0fdf13a2ab623f4bac2
Last active February 22, 2018 02:54
Show content based on select dropdown
<?php /* Template Name: West Region Template */ ?>
<? get_header(); ?>
<?php if ( presscore_is_content_visible() ): ?>
<div id="content" class="content" role="main">
<div class="page-header">
<div class="page-header-wrap">
<span class="small-title">BLUE CHAIR BAY RUM</span>
var el = document.getElementById('shipping_method_0_free_shipping1');
el.addEventListener("click", function(){
document.getElementById('ship-to-different-address-checkbox').click;
// alert("Harry");
});
@hborrelli1
hborrelli1 / index.php
Last active March 29, 2019 15:37
Custom Loop for WP posts
<?php
/**
* The main template file.
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
<?php
$args = array(
'post_type' => 'service',
'posts_per_page' => -1
);
$loop = new WP_Query( $args );
?>
<!-- Nav Slider -->
<div class="slider-nav">
<script type="text/javascript">
// Scroll bar Process Page
var elementPosition = jQuery('#stepNumber').offset();
jQuery(window).scroll(function () {
if(jQuery(window).scrollTop() > 400) {
jQuery('#stepNumber').addClass('fixed-number');
} else {
jQuery('#stepNumber').removeClass('fixed-number');
}
<?php
$teamTitleRow = get_field('team_title_row');
$teamSectionBg = get_field('team_section_background_image');
?>
<div class="avero-team-block-wrap" style="background-image:url(<?php echo $teamSectionBg; ?>)">
<div class="content-wrap">
<div class="title-row">
<span class="tiny-head"><?php echo $teamTitleRow['subtitle']; ?></span>
<?php
$teamTitleRow = get_field('team_title_row');
$teamSectionBg = get_field('team_section_background_image');
?>
<div class="avero-team-block-wrap" style="background-image:url(<?php echo $teamSectionBg; ?>)">
<div class="content-wrap">
<div class="title-row">
<span class="tiny-head"><?php echo $teamTitleRow['subtitle']; ?></span>
<?php
/**
* Product Card used in loops and grids.
*
* @package BigCommerce
* @since v1.7
*
* @var Product $product
* @var string $title
* @var string $brand