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',
// })
@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>