Add project status banners, re-style blockquotes
This commit is contained in:
parent
5d4d85a69f
commit
d92a493315
2 changed files with 53 additions and 6 deletions
|
@ -14,7 +14,9 @@
|
|||
$has_one_external_link = count( get_post_meta( get_the_ID(), 'External_Link', false ) ) === 1;
|
||||
$has_body_content = ! ! get_the_content();
|
||||
$links_externally = $has_one_external_link && ! $has_body_content;
|
||||
$post_link = ( $links_externally ) ? get_post_meta( get_the_ID(), 'External_Link', true ) : get_the_permalink();
|
||||
$split_link = explode( ';;', get_post_meta( get_the_ID(), 'External_Link', true ) );
|
||||
$link_href = ( count( $split_link ) > 1 ) ? $split_link[1] : $split_link[0];
|
||||
$post_link = ( $links_externally ) ? $link_href : get_the_permalink( get_the_ID() );
|
||||
?>
|
||||
<a class="item" href="<?php echo esc_url( $post_link ); ?>"<?php echo ( $links_externally ) ? ' target="_blank" rel="noopener noreferrer"' : ''; ?>>
|
||||
<article id="post-<?php the_ID(); ?>" class="tile col-m-6 col-4 col-w-3" style="background-image: url('<?php the_post_thumbnail_url(); ?>');">
|
||||
|
@ -28,11 +30,17 @@
|
|||
}
|
||||
?>
|
||||
<header>
|
||||
<?php
|
||||
$post_status = get_post_meta( get_the_ID(), 'Status', true );
|
||||
if ( $post_status ) :
|
||||
?>
|
||||
<span class="status-banner status-banner--<?php echo esc_attr( lcfirst( $post_status ) ); ?>"><?php echo wp_kses_post( $post_status ); ?></span>
|
||||
<?php endif; ?>
|
||||
<h1 class="<?php echo esc_attr( $small ); ?> post-title">
|
||||
<?php echo wp_kses_post( get_the_title() ); ?>
|
||||
</h1>
|
||||
<?php
|
||||
$subtitle = get_post_meta( get_the_ID(), 'Subtitle', true );
|
||||
$subtitle = get_post_meta( get_the_ID(), 'Subtitle', true );
|
||||
if ( $subtitle ) :
|
||||
?>
|
||||
<h2>
|
||||
|
|
Reference in a new issue