This repository has been archived by the owner. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fixes to content pages and styles
- Loading branch information
Showing
5 changed files
with
336 additions
and
143 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,85 @@ | ||
<?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 --> | ||
<hr /> | ||
<footer class="entry-footer"> | ||
<?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?> | ||
<?php | ||
/* translators: used between list items, there is a space after the comma */ | ||
$categories = get_the_category(get_the_ID()); | ||
$cats = 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>'; | ||
} | ||
} | ||
if(count($cats) > 0){ | ||
$categories_list = implode(', ', $cats); | ||
} | ||
//$categories_list = get_the_category_list( __( ', ', 'cs' ) ); | ||
if ( $categories_list && cs_categorized_blog() ) : | ||
?> | ||
<span class="cat-links"> | ||
<?php printf( __( 'Categories: %1$s <br />', 'cs' ), $categories_list ); ?> | ||
</span> | ||
<?php endif; // End if categories ?> | ||
<?php | ||
/* translators: used between list items, there is a space after the comma */ | ||
$tags_list = get_the_tag_list( '', __( ', ', 'cs' ) ); | ||
if ( $tags_list ) : | ||
?> | ||
<span class="tags-links"> | ||
<?php printf( __( 'Tags: %1$s', 'cs' ), $tags_list ); ?> | ||
</span> | ||
<?php endif; // End if $tags_list ?> | ||
<?php endif; // End if 'post' == get_post_type() ?> | ||
|
||
<?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?> | ||
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'cs' ), __( '1 Comment', 'cs' ), __( '% Comments', 'cs' ) ); ?></span> | ||
<?php endif; ?> | ||
|
||
<?php edit_post_link( __( 'Edit', 'cs' ), '<span class="edit-link">', '</span>' ); ?> | ||
</footer><!-- .entry-footer --> | ||
<?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 /> |
Oops, something went wrong.