This repository has been archived by the owner. It is now read-only.
Permalink
Cannot retrieve contributors at this time
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?
business/content.php
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
85 lines (75 sloc)
2.75 KB
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 | |
/** | |
* @package cs | |
*/ | |
?> | |
<article id="post-<?php the_ID(); ?>" <?php post_class('clearfix'); ?>> | |
<header class="entry-header"> | |
<?php | |
if(strlen(get_the_content()) > 0){ | |
the_title( sprintf( '<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h1>' ); | |
} | |
else{ | |
the_title( sprintf( '<h1 class="entry-title">', esc_url( get_permalink() ) ), '</h1>' ); | |
} | |
?> | |
<?php if ( 'post' == get_post_type() ) : ?> | |
<div class="entry-meta"> | |
<?php bus_posted_on(get_the_category(get_the_ID())); ?> | |
</div><!-- .entry-meta --> | |
<?php endif; ?> | |
</header><!-- .entry-header --> | |
<div class="entry-content"> | |
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'cs' ) ); ?> | |
<?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> | |
</footer><!-- .entry-footer --> | |
</article><!-- #post-## --><hr /> |