Skip to content

Instantly share code, notes, and snippets.

View ciaranha's full-sized avatar

Ciarán Hanrahan ciaranha

View GitHub Profile
@ciaranha
ciaranha / script.js
Created February 14, 2018 13:31
script clippings
// $('#owl-carousel').owlCarousel({
// navContainer: '#customNav',
// dotsContainer: '#customDots',
// })
<div class="numbers">
<div class="row">
<div class="col-md-6">
<h3 class="numbers-title">
<?php the_field('numbers_section_1_header');?>
</h3>
<div class="row">
<div class="col-md-6">
<div class="number-md">
@ciaranha
ciaranha / order-posts-types.php
Last active December 4, 2016 23:20
Order Custom Post Types by ACF values
<?php
$args = array(
'posts_per_page' => 5,
'post_type' => 'sports',
'meta_key' => 'event_type',
'meta_value' => 'Match',
'orderby' => array(
'match_date' => 'ASC',
)
);
<?php
// search-form same behavior as genesis with additional classes
// for bootstrap styling
add_filter( 'genesis_search_form', 'bsg_search_form', 10, 4);
function bsg_search_form( $form, $search_text, $button_text, $label ) {
$value_or_placeholder = ( get_search_query() == '' ) ? 'placeholder' : 'value';
.used-by {
height: 82px;
margin-bottom: 40px;
padding-top: 20px;
border: none;
white-space: nowrap;
overflow: hidden;
position: relative;
transform: translate3d(0, 0, 0);
<?php
/**
* Template Name: About Page Sidebar
* Description: Template used for general pages with left sidebar
*/
//* Add custom body class
add_filter( 'body_class', 'childthemeprefix_home_page_class' );
function childthemeprefix_home_page_class( $classes ) {
$classes[] = 'general-sidebar-page';
@ciaranha
ciaranha / template.php
Created October 13, 2016 01:33
ACF Image Gallery
<?php elseif( get_row_layout() == 'slider' ): ?>
<?php $images = get_sub_field('slider_shortcode');
if( $images ): ?>
<div id="general-slider">
<?php foreach( $images as $image ): ?>
<div class="item">
@ciaranha
ciaranha / gist:baf3e9f58cfe10f0230d4b209818f4d2
Created July 27, 2016 12:12
bootstrap repetable custom post type
<section>
<h2>FAQ</h2>
<div class="faq-row">
<?php wp_reset_query(); ?>
<?php
$args = array(
'post_type' => 'faq',
'posts_per_page' => -1,
<?php
/*
Template Name: Landing Page
*/ ?>
<?php get_header(); ?>
<section class="hero-section">
<div class="container">
<article>
@ciaranha
ciaranha / gist:21212900cfcc589cd48d
Created January 19, 2016 21:43
Wedding Bloom,...
<p>There are plenty of amazing things to do, eat and drink in Bloomington! It is a beautiful time of year and we highly recommend walking around campus.</p>
<p><strong>Restaurants</strong></p>
<ul style="margin-top: 0pt; margin-bottom: 0pt;">
<li style="list-style-type: disc;">
<p><a href="http://www.motherbearspizza.com/">Mother Bear&rsquo;s Pizza</a> is a favorite campus restaurant. The pizza and breadsticks are amazing! (<a href="https://www.google.com/maps/place/Mother+Bear's+Pizza/@39.1641064,-86.5177538,17z/data=!3m1!4b1!4m2!3m1!1s0x886c6695f2b293cb:0xd1e30fafa812b56b">1428 E Third Street</a></p>
</li>
<li>
<p><a href="http://bbcbagel.com/">Bloomington Bagel Company</a> is another campus favorite. The bagels, pastries and coffee are perfect after a long night out in Bloomington. (Multiple locations,<a href="https://www.google.com/maps/place/Bloomington+Bagel+Co/@39.1671394,-86.5306144,17z/data=!3m1!4b1!4m2!3m1!1s0x886c66c2eef24eb1:0xcfa5c760fe1e28e6"> 113 N Dunn</a> is closest to campus)</p>
</li>
<li>