Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
<?php
// This is used when viewing a single post.
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php /* if ( has_post_thumbnail() ) {
echo '<div class="row">';
echo '<div class="col-sm-2">';
the_post_thumbnail();
echo '</div>';
echo '<div class="col-sm-10">';
} */?>
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
<div class="entry-meta">
<?php bus_posted_on(get_the_category(get_the_ID())); ?>
</div><!-- .entry-meta -->
<?php /*if ( has_post_thumbnail() ) {
echo '</div>';
echo '</div>';
} */?>
</header><!-- .entry-header -->
<div class="entry-content clearfix subpage">
<?php
if(get_post_meta( $post->ID, 'enable_sharelines', true) != 'disabled'){
?>
<div class="sharelines">
<?php
$twittershareline = get_post_meta( $post->ID, 'twittershareline', true);
if(empty($twittershareline)) $twittershareline = get_the_title();
$facebookshareline = get_post_meta( $post->ID, 'facebookshareline', true);
if(empty($facebookshareline)) $facebookshareline = get_the_title();
$linkedinshareline = get_post_meta( $post->ID, 'linkedinshareline', true);
if(empty($linkedinshareline)) $linkedinshareline = get_the_title();
?>
<div class="shareline-twitter">
<a href="#" onclick="window.open('https://twitter.com/intent/tweet?text=<?php echo urlencode(preg_replace("/&#?[a-z0-9]+;/i","",html_entity_decode($twittershareline)));?>&url=<?php echo urlencode(get_permalink()); ?>&via=UConnBusiness', 'Twitter', 'width=500,height=500');"><span class="social social-twitter"></span><span><?php echo $twittershareline; ?></span></a>
</div>
<div class="shareline-facebook">
<a href="http://www.facebook.com/sharer/sharer.php?u=<?php the_permalink(); ?>"><span class="social social-facebook"></span><span><?php echo $facebookshareline; ?></span></a>
</div>
<div class="shareline-linkedin">
<a href="https://www.linkedin.com/shareArticle?mini=true&url=<?php echo urlencode(the_permalink()); ?>&title=<?php echo $linkedinshareline; ?>&summary=<?php echo urlencode(get_the_excerpt()); ?>&source=UConn-Aurora"><span class="social social-linked-in"></span><span><?php echo $linkedinshareline; ?></span></a>
</div>
</div>
<?php
}
the_content();
?>
<?php
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'cs' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<div class="cats-and-tags">
<?php
/* translators: used between list items, there is a space after the comma */
$categories = get_the_category(get_the_ID());
$cats = array();
$catids = array();
foreach($categories as $cat){
$parent = get_category($cat->parent);
if($parent->slug != 'authors'){
$cats[] = '<a href="'.esc_url( get_category_link($cat->term_id) ).'" title="'.$cat->name.'">'.$cat->name.'</a>';
$catids[] = $cat->term_id;
}
}
if(count($cats) > 0){
$category_list = implode(', ', $cats);
}
//$category_list = get_the_category_list( __( ', ', 'cs' ) );
/* translators: used between list items, there is a space after the comma */
$tag_list = get_the_tag_list( '', __( ', ', 'cs' ) );
if ( ! cs_categorized_blog() ) {
// This blog only has 1 category so we just need to worry about tags in the meta text
if ( '' != $tag_list ) {
$meta_text = __( '<div class="row"><div class="col-sm-2">Tags:</div><div class="col-sm-10"> %2$s.</div></div>', 'cs' );
} else {
$meta_text = __( '', 'cs' );
}
} else {
// But this blog has loads of categories so we should probably display them here
if ( '' != $tag_list ) {
$meta_text = __( '<div class="row"><div class="col-sm-2">Categories:</div><div class="col-sm-10"> %1$s</div></div><div class="row"> <div class="col-sm-2">Tags:</div><div class="col-sm-10"> %2$s</div></div>', 'cs' );
} else {
$meta_text = __( '<div class="row"><div class="col-sm-2">Categories:</div><div class="col-sm-10"> %1$s</div></div>', 'cs' );
}
} // end check for categories on this blog
printf(
$meta_text,
$category_list,
$tag_list,
get_permalink()
);
?>
</div>
<div id="social-buttons">
<div class="row">
<div class="col-sm-2">Share on:</div>
<div class="col-sm-10 social-section">
<a href="http://www.facebook.com/sharer/sharer.php?u=<?php the_permalink(); ?>"><img src="<?php echo get_stylesheet_directory_uri().'/img/asset.f.logo.lg.png';?>" alt="facebook" />Facebook</a>
<a href="http://twitter.com/share?url=<?php the_permalink(); ?>&text=<?php echo get_the_title(); ?>"><img src="<?php echo get_stylesheet_directory_uri().'/img/twitter-bird-white-on-blue.png';?>" alt="Twitter" />Twitter </a>
<a href="http://www.linkedin.com/shareArticle?url=<?php the_permalink(); ?>&title=<?php echo get_the_title(); ?>&source=<?php the_permalink(); ?>"> <img src="<?php echo get_stylesheet_directory_uri().'/img/linkedin.png';?>" alt="LinkedIn" />LinkedIn</a>
<a href="mailto:?subject=Shared from business.uconn.edu&amp;body=<?php echo get_the_title(); ?>%0D%0A%0D%0A<?php the_permalink(); ?>"><img src="<?php echo get_stylesheet_directory_uri().'/img/email-icon.png';?>" alt="email" />Email</a>
</div>
</div>
</div>
<form>
<input class="printbutton" type="button" value="Print this page" onClick="window.print()">
</form>
<hr />
<div class="related-wrap clearfix">
<h4>You might be interested in:</h4>
<?php
$query = new WP_Query( array( 'category__or' => $catids ,
'meta_query' => array(
array(
'key' => '_thumbnail_id',
'compare' => 'EXISTS'
),
)) );
$posts = $query->get_posts();
$count = 0;
foreach($posts as $relatedpost){
if(get_the_ID() == $relatedpost->ID) continue;
$count++;
if($count > 3) break;
?>
<div class="relatedpost col-sm-4">
<a href="<?php echo esc_url( get_permalink($relatedpost->ID) ); ?>"><?php echo get_the_post_thumbnail($relatedpost->ID); ?></a>
<a href="<?php echo esc_url( get_permalink($relatedpost->ID) ); ?>" class="relatedtitle"><h5><?php echo get_the_title($relatedpost->ID); ?></h5></a>
</div>
<?php
}
?>
</div>
<hr />
</footer><!-- .entry-footer -->
</article><!-- #post-## -->