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
.struckthrough { | |
padding: 36px 10px; | |
h2 { | |
text-align: center; | |
position: relative; | |
z-index:1; | |
font-size: 20px; | |
text-transform: uppercase; | |
margin: 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
$(".event-more-control").click(function(e) { | |
e.preventDefault(); // prevent default click event | |
$(this).toggleClass('active'); | |
$(this).parentsUntil('event-index-details').children(".event-excerpt").slideToggle(500); | |
$(this).children(".link-text").text(function(i, oldText) { | |
return oldText === 'More' ? 'Less' : 'More'; | |
}); | |
}); |
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
// Adapted from http://krogsgard.com/2012/wordpress-body-class-post-meta/ | |
add_filter('body_class','tend_custom_tax_body_class'); | |
function tend_custom_tax_body_class( $classes ) { | |
global $wp_query; | |
$postid = $wp_query->post->ID; | |
if ( is_single() ) { | |
$post_styles = 'post_style'; |
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
// -------------------------------------------------- | |
// Flexbox LESS mixins | |
// The spec: http://www.w3.org/TR/css3-flexbox | |
// -------------------------------------------------- | |
// Flexbox display | |
// flex or inline-flex | |
.flex-display(@display: flex) { | |
display: ~"-webkit-@{display}"; | |
display: ~"-moz-@{display}"; |
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
// Switch template based on page parent or grandparent. Requires the page parent template is set. | |
add_action('template_include', 'auto_child_template'); | |
function auto_child_template( $template = '' ) { | |
global $post; | |
if ( ! is_page() ) { | |
return $template; | |
} | |
else { |
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 | |
$terms = get_terms( 'product_cat' ); | |
echo '<select class="product-category-list">'; | |
foreach ( $terms as $term ) { | |
$term_link = get_term_link( $term ); | |
if ( is_wp_error( $term_link ) ) { | |
continue; | |
} ?> |
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 ($wp_query->current_post == 0 && !is_paged()) : | |
$first = ( $wp_query->current_post == 0 && !is_paged() ) ? 'firstpost' : ''; post_class($first); | |
else : | |
post_class(); | |
endif; | |
?> |
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
// Filter wp_nav_menu() to add additional links and other output | |
function new_nav_menu_items($items) { | |
$homelink = '<li class="home"><a href="' . home_url( '/' ) . '">' . __('Home') . '</a></li>'; | |
// add the home link to the end of the menu | |
$items = $items . $homelink; | |
return $items; | |
} | |
add_filter( 'wp_nav_menu_items', 'new_nav_menu_items' ); | |
or add_filter( 'wp_nav_menu_{$menu->slug}_items', 'new_nav_menu_items' ); |
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(get_field('override_opening_time', 'options')) : | |
echo '<span>' . get_field('override_message', 'options') . '</span>'; | |
else : | |
$time = current_time('timestamp'); | |
$day = date('N', $time); | |
if($day==1) : | |
$today = get_field('monday', 'options'); | |
elseif($day==2) : |