more styling & layout improvements
This commit is contained in:
parent
3eab6277ae
commit
a666face00
8 changed files with 216 additions and 233 deletions
53
index.php
53
index.php
|
@ -9,38 +9,53 @@
|
|||
namespace WP_RDNYC;
|
||||
|
||||
get_header(); ?>
|
||||
<main class="rdnyc-single-outer">
|
||||
|
||||
<main class="rdnyc-index-outer">
|
||||
<div class="content">
|
||||
<?php if (!is_singular()) : ?>
|
||||
<h1 class="fw-light text-gray-300 mb-4 border-bottom border-dashed border-spaceblue-600">
|
||||
<?php if (is_archive()) : get_the_archive_title();
|
||||
else : single_post_title();
|
||||
endif;
|
||||
?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
// grab search query if there is one
|
||||
$search_query_str = is_search() ? esc_html( get_search_query() ) : false;
|
||||
|
||||
// output super heading if not singular
|
||||
if (!is_singular()) {
|
||||
$title = is_archive() ? get_the_archive_title() : single_post_title( '', false );
|
||||
$title = $search_query_str ? "Search results for: “$search_query_str”" : $title;
|
||||
echo get_page_multi_heading( $title );
|
||||
}
|
||||
|
||||
// begin the "if have_posts" section
|
||||
if ( have_posts() ) :
|
||||
while ( have_posts() ) :
|
||||
the_post();
|
||||
echo get_template_part( 'content-templates/content', 'article' );
|
||||
endwhile;
|
||||
?>
|
||||
|
||||
<?php if (!is_singular()) : ?>
|
||||
<nav class="d-flex justify-content-between" aria-label="Page navigation">
|
||||
<div class="nav-previous alignleft"><?php next_posts_link( '← Older' ); ?></div>
|
||||
<div class="nav-next alignright"><?php previous_posts_link( 'Newer →' ); ?></div>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
// output listing pagination if not singular
|
||||
if (!is_singular()) : ?>
|
||||
<nav class="d-flex justify-content-between" aria-label="Page navigation">
|
||||
<div class="nav-previous alignleft">
|
||||
<?php echo inline_svg( 'bsi-chevron-left', array( 'div_class' => 'icon baseline' ) ); ?>
|
||||
<?php next_posts_link( 'Older' ); ?>
|
||||
</div>
|
||||
<div class="nav-next alignright">
|
||||
<?php previous_posts_link( 'Newer' ); ?>
|
||||
<?php echo inline_svg( 'bsi-chevron-right', array( 'div_class' => 'icon baseline' ) ); ?>
|
||||
</div>
|
||||
</nav>
|
||||
<?php endif;
|
||||
|
||||
<?php
|
||||
// if not have_posts, then handle if this is a search page
|
||||
else :
|
||||
if ($search_query_str) { echo "Search results for: “$search_query_str”"; }
|
||||
|
||||
// finally, end the "if have_posts" section
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
get_footer('', array('frontpage'=>false));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue