This file contains 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(function ($) { | |
//grab the entire query string | |
var query = document.location.search.replace('?', ''); | |
//extract each field/value pair | |
query = query.split('&'); | |
//run through each pair | |
for (var i = 0; i < query.length; i++) { | |
This file contains 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
function heat_twitter_card(){ | |
$title = get_post_meta(get_queried_object_id(), 'Title', true); | |
$description = get_post_meta(get_queried_object_id(), 'Description', true); | |
$image = get_the_image(array('format'=>'array')); ?> | |
<!--Twitter Card--> | |
<meta name="twitter:card" content="summary"> | |
<meta name="twitter:site" content="@marcheatley"> |
This file contains 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 | |
date_default_timezone_set('Europe/London'); | |
// Define normal opening hours in nested arrays | |
$days = array( | |
'monday' => array('label' => 'Monday', 'open' => '09:30', 'close' => '22:00'), | |
'tuesday' => array('label' => 'Tuesday', 'open' => '09:30', 'close' => '22:00'), | |
'wednesday' => array('label' => 'Wednesday','open' => '09:30', 'close' => '22:00'), |
This file contains 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 | |
// Check for a featured image with get_the_image by Justin Tadlcok http://themehybrid.com | |
// if one is not found check for a custom field called video | |
// if there is a custom field called video and it has an address from Vimeo or YouTube, grab the thumbnail | |
?> | |
<?php $thid = get_the_ID(); | |
$vim_prefix = 'http://vimeo.com/'; | |
$yt_prefix = 'http://www.youtube.com/watch?v='; |
This file contains 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( | |
'sort_order' => 'ASC', | |
'sort_column' => 'menu_order', | |
'hierarchical' => true, | |
'post_type' => 'post_type', | |
'post_status' => 'publish' | |
); | |
$post_type = get_pages($args); | |
foreach ($post_type as $post_object): |
This file contains 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("taxonomy_name"); | |
$count = count($terms); | |
if ( $count > 1 ): foreach ( $terms as $term ): ?> | |
<a href="<?php echo get_bloginfo('url') . '/taxonomy_slug/' . $term->slug ?>"><?php echo $term->name ?></a> | |
<?php endforeach; endif; ?> |
This file contains 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 function span_copyright($year = 'auto'){ | |
if(intval($year) == 'auto'){ $year = date('Y'); } | |
if(intval($year) == date('Y')){ echo intval($year); } | |
if(intval($year) < date('Y')){ echo intval($year) . ' - ' . date('Y'); } | |
if(intval($year) > date('Y')){ echo date('Y'); } | |
} ?> | |
<span class="copyright">© <?php span_copyright(); ?> - <?php echo get_bloginfo('name'); ?></span> |
This file contains 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
wp_oembed_add_provider( 'http://soundcloud.com/*', 'http://soundcloud.com/oembed' ); |
NewerOlder