This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( get_field( 'slides' ) ) : // repeater field ?> | |
<ul class="slider"> | |
<?php while ( the_repeater_field( 'slides' ) ) : | |
$image = get_sub_field( 'slide' ); // sub-field image ID | |
$slide = wp_get_attachment_image_src( $image, 'slides' ); | |
$alt = get_post_meta( $image, '_wp_attachment_image_alt', true ); | |
?> | |
<li><img src="<?php echo $slide[0]; ?>" alt="<?php echo $alt; ?>"></li> | |
<?php endwhile; ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Remove Unecessary Styles & Scripts | |
function h5bs_remove_junk() { | |
if ( ! is_admin() ) : | |
global $WP_Views; | |
remove_action( 'wp_print_styles', array( $WP_Views, 'add_render_css' ) ); | |
wp_dequeue_style( 'views-pagination-style' ); // plugins/wp-views/embedded/res/css/wpv-pagination.css | |
wp_dequeue_style( 'date-picker-style' ); // plugins/wp-views/embedded/res/css/datepicker.css |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$args = array( | |
'post_type' => 'slides', // custom post type | |
'orderby' => 'menu_order', | |
'posts_per_page' => -1 | |
); | |
$slides = new WP_Query( $args ); | |
if ( $slides->have_posts() ) : $count = 0; ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function ($) { | |
'use strict'; | |
function doneResizing() { | |
if (Modernizr.mq('screen and (min-width:768px)')) { | |
// action for screen widths including and above 768 pixels | |
} else if (Modernizr.mq('screen and (max-width:767px)')) { | |
// action for screen widths below 768 pixels | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Custom Excerpt | |
function custom_trim_words( $text, $num_words = 55, $more = null ) { | |
if ( null === $more ) | |
$more = __( '…' ); | |
$original_text = $text; | |
$text = strip_shortcodes( $text ); | |
// Add tags that you don't want stripped |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{* if per page is set add canonical link *} | |
{if isset($_REQUEST.items_per_page)} | |
{assign var="page_current" value="/page-`$pagination.current_page`"} | |
{assign var="can_url" value=$config.current_url|fn_query_remove:"items_per_page"|fn_url} | |
{assign var="page_url" value=$can_url|replace:"$page_current":""} | |
<link href="{$config.current_location}{$page_url}" rel="canonical"> | |
{/if} | |
{* if paginated add rel prev/next links *} | |
{if $pagination.current_page >= 1} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Excerpt character count | |
function excerpt_count_js() { ?> | |
<script> | |
jQuery(document).ready(function ($) { | |
var counterVal = $('#excerpt-counter input').val($('#excerpt').val().length); | |
$('#postexcerpt .handlediv').after('<div id="excerpt-counter"><small>Excerpt length: </small> <input type="text" value="0" maxlength="3" size="1" readonly> <small>character(s)</small></div>'); | |
counterVal | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* http://css-tricks.com/equal-height-blocks-in-rows/ */ | |
var currentTallest = 0, | |
currentRowStart = 0, | |
rowDivs = new Array(); | |
function setConformingHeight(el, newHeight) { | |
// set the height to something new, but remember the original height in case things change | |
el.data("originalHeight", (el.data("originalHeight") == undefined) ? (el.height()) : (el.data("originalHeight"))); | |
el.height(newHeight); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$args = array( | |
'orderby' => 'ID' | |
); | |
$terms = get_terms( 'testimonial_category', $args ); | |
?> | |
<!-- bootstrap tabs --> | |
<ul class="nav-tabs"> | |
<?php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*=LESS Mixins | |
---------------------------------------*/ | |
/*=Helpers | |
-----------------------------*/ | |
.clearfix { | |
*zoom: 1; | |
&:before, &:after { | |
content: ""; display: table; | |
} |