Browse Source

Lots of cleanup

tags/7.0.1^2
Chris Wiegman 2 years ago
parent
commit
154f8aa4cf
No known key found for this signature in database GPG Key ID: 72131815B87FBC2F
10 changed files with 419 additions and 396 deletions
  1. +65
    -63
      archive.php
  2. +20
    -18
      comments.php
  3. +22
    -23
      home.php
  4. +28
    -23
      index.php
  5. +5
    -3
      page-archive.php
  6. +83
    -81
      page-developer.php
  7. +127
    -124
      page-speaker.php
  8. +25
    -18
      page.php
  9. +23
    -22
      search.php
  10. +21
    -21
      single.php

+ 65
- 63
archive.php View File

@@ -13,95 +13,97 @@ namespace CW\Theme\Templates\Archive;

use CW\Theme\Functions\Template_Tags;

get_header(); ?>
get_header();
?>

<section id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<section id="primary" class="content-area">
<main id="main" class="site-main" role="main">

<?php if ( have_posts() ) : ?>
<?php if ( have_posts() ) : ?>

<header class="page-header">
<h1 class="page-title">
<?php
if ( is_category() ) :
<header class="page-header">
<h1 class="page-title">
<?php
if ( is_category() ) :

single_cat_title();
esc_html_e( ' Posts', 'chriswiegman' );
single_cat_title();
esc_html_e( ' Posts', 'chriswiegman' );

elseif ( is_tag() ) :
single_tag_title();
elseif ( is_tag() ) :
single_tag_title();

elseif ( is_author() ) :
printf( __( 'Author: %s', 'chriswiegman' ), '<span class="vcard">' . get_the_author() . '</span>' );
elseif ( is_author() ) :
printf( __( 'Author: %s', 'chriswiegman' ), '<span class="vcard">' . get_the_author() . '</span>' );

elseif ( is_day() ) :
printf( __( 'Day: %s', 'chriswiegman' ), '<span>' . get_the_date() . '</span>' );
elseif ( is_day() ) :
printf( __( 'Day: %s', 'chriswiegman' ), '<span>' . get_the_date() . '</span>' );

elseif ( is_month() ) :
printf( __( 'Month: %s', 'chriswiegman' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'chriswiegman' ) ) . '</span>' );
elseif ( is_month() ) :
printf( __( 'Month: %s', 'chriswiegman' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'chriswiegman' ) ) . '</span>' );

elseif ( is_year() ) :
printf( __( 'Year: %s', 'chriswiegman' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'chriswiegman' ) ) . '</span>' );
elseif ( is_year() ) :
printf( __( 'Year: %s', 'chriswiegman' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'chriswiegman' ) ) . '</span>' );

elseif ( is_tax( 'post_format', 'post-format-aside' ) ) :
esc_html_e( 'Asides', 'chriswiegman' );
elseif ( is_tax( 'post_format', 'post-format-aside' ) ) :
esc_html_e( 'Asides', 'chriswiegman' );

elseif ( is_tax( 'post_format', 'post-format-gallery' ) ) :
esc_html_e( 'Galleries', 'chriswiegman' );
elseif ( is_tax( 'post_format', 'post-format-gallery' ) ) :
esc_html_e( 'Galleries', 'chriswiegman' );

elseif ( is_tax( 'post_format', 'post-format-image' ) ) :
esc_html_e( 'Images', 'chriswiegman' );
elseif ( is_tax( 'post_format', 'post-format-image' ) ) :
esc_html_e( 'Images', 'chriswiegman' );

elseif ( is_tax( 'post_format', 'post-format-video' ) ) :
esc_html_e( 'Videos', 'chriswiegman' );
elseif ( is_tax( 'post_format', 'post-format-video' ) ) :
esc_html_e( 'Videos', 'chriswiegman' );

elseif ( is_tax( 'post_format', 'post-format-quote' ) ) :
esc_html_e( 'Quotes', 'chriswiegman' );
elseif ( is_tax( 'post_format', 'post-format-quote' ) ) :
esc_html_e( 'Quotes', 'chriswiegman' );

elseif ( is_tax( 'post_format', 'post-format-link' ) ) :
esc_html_e( 'Links', 'chriswiegman' );
elseif ( is_tax( 'post_format', 'post-format-link' ) ) :
esc_html_e( 'Links', 'chriswiegman' );

elseif ( is_tax( 'post_format', 'post-format-status' ) ) :
esc_html_e( 'Statuses', 'chriswiegman' );
elseif ( is_tax( 'post_format', 'post-format-status' ) ) :
esc_html_e( 'Statuses', 'chriswiegman' );

elseif ( is_tax( 'post_format', 'post-format-audio' ) ) :
esc_html_e( 'Audios', 'chriswiegman' );
elseif ( is_tax( 'post_format', 'post-format-audio' ) ) :
esc_html_e( 'Audios', 'chriswiegman' );

elseif ( is_tax( 'post_format', 'post-format-chat' ) ) :
esc_html_e( 'Chats', 'chriswiegman' );
elseif ( is_tax( 'post_format', 'post-format-chat' ) ) :
esc_html_e( 'Chats', 'chriswiegman' );

else :
esc_html_e( 'Archives', 'chriswiegman' );
else :
esc_html_e( 'Archives', 'chriswiegman' );

endif;
?>
</h1>
</header><!-- .page-header -->
endif;
?>
</h1>
</header><!-- .page-header -->

<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>

<?php
/**
* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'template-parts/content', get_post_format() );
?>
<?php
/**
* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'template-parts/content', get_post_format() );
?>

<?php endwhile; ?>
<?php endwhile; ?>

<?php Template_Tags\paging_nav(); ?>
<?php Template_Tags\paging_nav(); ?>

<?php else : ?>
<?php else : ?>

<?php get_template_part( 'template-parts/content', 'none' ); ?>
<?php get_template_part( 'template-parts/content', 'none' ); ?>

<?php endif; ?>
<?php endif; ?>

</main><!-- #main -->
</section><!-- #primary -->
</main><!-- #main -->
</section><!-- #primary -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>
<?php
get_sidebar();
get_footer();

+ 20
- 18
comments.php View File

@@ -25,45 +25,47 @@ if ( post_password_required() ) {
<?php if ( have_comments() ) : ?>
<h2 class="comments-title">Comments</h2>

<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
<nav id="comment-nav-above" class="comment-navigation" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'chriswiegman' ); ?></h1>
<h1 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'chriswiegman' ); ?></h1>

<div
class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'chriswiegman' ) ); ?></div>
class="nav-previous"><?php previous_comments_link( esc_html__( '&larr; Older Comments', 'chriswiegman' ) ); ?></div>
<div
class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'chriswiegman' ) ); ?></div>
class="nav-next"><?php next_comments_link( esc_html__( 'Newer Comments &rarr;', 'chriswiegman' ) ); ?></div>
</nav><!-- #comment-nav-above -->
<?php endif; // check for comment navigation ?>
<?php endif; // Check for comment navigation. ?>

<ol class="comment-list">
<?php
wp_list_comments( array(
'style' => 'ol',
'short_ping' => true,
'avatar_size' => 64,
) );
wp_list_comments(
array(
'style' => 'ol',
'short_ping' => true,
'avatar_size' => 64,
)
);
?>
</ol><!-- .comment-list -->

<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
<nav id="comment-nav-below" class="comment-navigation" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'chriswiegman' ); ?></h1>
<h1 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'chriswiegman' ); ?></h1>

<div
class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'chriswiegman' ) ); ?></div>
class="nav-previous"><?php previous_comments_link( esc_html__( '&larr; Older Comments', 'chriswiegman' ) ); ?></div>
<div
class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'chriswiegman' ) ); ?></div>
class="nav-next"><?php next_comments_link( esc_html__( 'Newer Comments &rarr;', 'chriswiegman' ) ); ?></div>
</nav><!-- #comment-nav-below -->
<?php endif; // check for comment navigation ?>
<?php endif; // Check for comment navigation. ?>

<?php endif; // have_comments() ?>
<?php endif; ?>

<?php
// If comments are closed and there are comments, let's leave a little note, shall we?
if ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
if ( ! comments_open() && '0' !== (int) get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
?>
<p class="no-comments"><?php _e( 'Comments are closed.', 'chriswiegman' ); ?></p>
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'chriswiegman' ); ?></p>
<?php endif; ?>

<?php comment_form(); ?>


+ 22
- 23
home.php View File

@@ -13,37 +13,36 @@ namespace CW\Theme\Templates\Home;

use CW\Theme\Functions\Template_Tags;

get_header(); ?>
get_header();
?>

<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">

<?php if ( have_posts() ) : ?>
<?php
if ( have_posts() ) {

<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
/* Start the Loop */
while ( have_posts() ) {

<?php
/**
* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'template-parts/content', get_post_format() );
?>
the_post();

<?php endwhile; ?>
get_template_part( 'template-parts/content', get_post_format() );

<?php Template_Tags\paging_nav(); ?>
}

<?php else : ?>
Template_Tags\paging_nav();

<?php get_template_part( 'template-parts/content', 'none' ); ?>
} else {

<?php endif; ?>
get_template_part( 'template-parts/content', 'none' );

</main><!-- #main -->
</div><!-- #primary -->
}
?>

<?php get_sidebar(); ?>
<?php get_footer(); ?>
</main><!-- #main -->
</div><!-- #primary -->

<?php
get_sidebar();
get_footer();

+ 28
- 23
index.php View File

@@ -13,37 +13,42 @@ namespace CW\Theme\Templates\Index;

use CW\Theme\Functions\Template_Tags;

get_header(); ?>
get_header();
?>

<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">

<?php if ( have_posts() ) : ?>

<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php if ( have_posts() ) : ?>

<?php /* Start the Loop */ ?>
<?php
/**
* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'template-parts/content', get_post_format() );
?>
while ( have_posts() ) :
the_post();
?>

<?php
/**
* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'template-parts/content', get_post_format() );
?>

<?php endwhile; ?>
<?php endwhile; ?>

<?php Template_Tags\paging_nav(); ?>
<?php Template_Tags\paging_nav(); ?>

<?php else : ?>
<?php else : ?>

<?php get_template_part( 'template-parts/content', 'none' ); ?>
<?php get_template_part( 'template-parts/content', 'none' ); ?>

<?php endif; ?>
<?php endif; ?>

</main><!-- #main -->
</div><!-- #primary -->
</main><!-- #main -->
</div><!-- #primary -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>
<?php
get_sidebar();
get_footer();

+ 5
- 3
page-archive.php View File

@@ -11,7 +11,8 @@

namespace CW\Theme\Templates\Page\Archive;

get_header(); ?>
get_header();
?>

<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
@@ -79,5 +80,6 @@ get_header(); ?>
</main><!-- #main -->
</div><!-- #primary -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>
<?php
get_sidebar();
get_footer();

+ 83
- 81
page-developer.php View File

@@ -11,76 +11,77 @@

namespace CW\Theme\Templates\Page\Developer;

get_header(); ?>
get_header();
?>

<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

<?php
while ( have_posts() ) {
<?php
while ( have_posts() ) {

the_post();
?>
the_post();
?>

<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header>
<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header>

<div class="entry-content">
<div class="entry-content">

<?php the_content(); ?>
<?php the_content(); ?>

<div id="projects">
<div id="projects">

<h2><?php esc_html_e( 'Selected Projects', 'chriswiegman' ); ?></h2>
<h2><?php esc_html_e( 'Selected Projects', 'chriswiegman' ); ?></h2>

<!-- begin .archive-projects-->
<ul class="archive-projects cpt-list">
<!-- begin .archive-projects-->
<ul class="archive-projects cpt-list">

<?php
$args = array( 'post_type' => 'project' );
$loop = new \WP_Query( $args );
?>
<?php
$args = array( 'post_type' => 'project' );
$loop = new \WP_Query( $args );
?>

<?php
while ( $loop->have_posts() ) {
<?php
while ( $loop->have_posts() ) {

$loop->the_post();
$loop->the_post();

?>
<li id="post-<?php esc_attr( the_ID() ); ?>" <?php post_class(); ?>>
?>
<li id="post-<?php esc_attr( the_ID() ); ?>" <?php post_class(); ?>>

<?php
<?php

$title = get_the_title();
$permalink = esc_url( get_permalink() );
$types = get_the_terms( get_the_ID(), 'project-type' );
$statuses = get_the_terms( get_the_ID(), 'project-status' );
$title = get_the_title();
$permalink = esc_url( get_permalink() );
$types = get_the_terms( get_the_ID(), 'project-type' );
$statuses = get_the_terms( get_the_ID(), 'project-status' );

if ( has_term( 'wordpress-plugin', 'project-type', get_the_ID() ) ) {
if ( has_term( 'wordpress-plugin', 'project-type', get_the_ID() ) ) {

$icon = 'wordpress';
$icon = 'wordpress';

} elseif ( has_term( 'google-chrome-extension', 'project-type', get_the_ID() ) ) {
} elseif ( has_term( 'google-chrome-extension', 'project-type', get_the_ID() ) ) {

$icon = 'google';
$icon = 'google';

} else {
} else {

$icon = 'laptop';
$icon = 'laptop';

}
}

?>
?>

<i class="list-icon icon-<?php echo esc_attr( $icon ); ?>"></i>
<i class="list-icon icon-<?php echo esc_attr( $icon ); ?>"></i>

<div class="entry-header">
<div class="entry-header">

<?php printf( '<h3 class="entry-title"><a href="%s" title="%s" rel="bookmark">%s</a></h3>', esc_url( $permalink ), esc_attr( $title ), sanitize_text_field( $title ) ); ?>
<?php printf( '<h3 class="entry-title"><a href="%s" title="%s" rel="bookmark">%s</a></h3>', esc_url( $permalink ), esc_attr( $title ), sanitize_text_field( $title ) ); ?>

<div class="entry-meta">
<div class="entry-meta">
<span class="project-types">
<?php esc_html_e( 'Type: ', 'ChrisWiegman' ); ?>
<?php foreach ( $types as $type ) { ?>
@@ -94,52 +95,53 @@ get_header(); ?>
<span class="project-type"><?php echo esc_html( $type->name ); ?></span>
<?php } ?>
</span>
<span class="project-statuses">
<span class="project-statuses">
<?php esc_html_e( 'Status: ', 'ChrisWiegman' ); ?>
<?php foreach ( $statuses as $status ) { ?>
<?php
$term_link = get_term_link( $status );
if ( is_wp_error( $term_link ) ) {
continue;
}
?>
<span class="project-status"><?php echo esc_html( $status->name ); ?></span>
<?php } ?>
<?php foreach ( $statuses as $status ) { ?>
<?php
$term_link = get_term_link( $status );
if ( is_wp_error( $term_link ) ) {
continue;
}
?>
<span class="project-status"><?php echo esc_html( $status->name ); ?></span>
<?php } ?>
</span>
</div>
<!-- .entry-meta -->
</div>
<!-- .entry-meta -->

</div>
<div class="entry-description">
<?php the_content(); ?>
</div>
<!-- .entry-header -->
<div class="divider"></div>
</li><!-- #post-## -->
</div>
<div class="entry-description">
<?php the_content(); ?>
</div>
<!-- .entry-header -->
<div class="divider"></div>
</li><!-- #post-## -->

<?php
<?php

}
wp_reset_postdata();
?>
}
wp_reset_postdata();
?>

</ul>
<!-- end .archive-projects-->
</ul>
<!-- end .archive-projects-->

<p class="projects-note"><?php esc_html_e( 'Note that "archived" projects are projects I am no longer involved in for
<p class="projects-note"><?php esc_html_e( 'Note that "archived" projects are projects I am no longer involved in for
one reason or another.', 'chriswiegman' ); ?></p>

</div>

</div>
</div>

<?php } // End of the loop.
?>
</article><!-- #post-## -->
</main>
<!-- #main -->
</div><!-- #primary -->
</div>

<?php get_sidebar(); ?>
<?php get_footer(); ?>
<?php } // End of the loop.
?>
</article><!-- #post-## -->
</main>
<!-- #main -->
</div><!-- #primary -->

<?php
get_sidebar();
get_footer();

+ 127
- 124
page-speaker.php View File

@@ -11,182 +11,185 @@

namespace CW\Theme\Templates\Page\Speaker;

get_header(); ?>
get_header();
?>

<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

<?php
while ( have_posts() ) {
<?php
while ( have_posts() ) {

the_post();
?>
the_post();
?>

<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header>

<div class="entry-content">

<?php the_content(); ?>

<div id="speaking">

<h2><?php esc_html_e( 'Selected Talks', 'chriswiegman' ); ?></h2>

<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header>

<div class="entry-content">

<?php the_content(); ?>

<div id="speaking">

<h2><?php esc_html_e( 'Selected Talks', 'chriswiegman' ); ?></h2>

<!-- begin .archive-projects-->
<ul class="archive-speaking cpt-list">

<?php
$args = array(
'post_type' => 'speaking',
'order' => 'ASC',
'orderby' => 'title',
'nopaging' => true,
);
$loop = new \WP_Query( $args );
$count = 0;
$icons = array(
'megaphone',
'comment',
'user',
'sitemap',
'laptop',
'fork',
'info',
'bank',
'server',
'television',
);
?>

<?php
while ( $loop->have_posts() ) {

$count ++;
$loop->the_post();
<!-- begin .archive-projects-->
<ul class="archive-speaking cpt-list">

<?php
$args = array(
'post_type' => 'speaking',
'order' => 'ASC',
'orderby' => 'title',
'nopaging' => true,
);
$loop = new \WP_Query( $args );
$count = 0;
$icons = array(
'megaphone',
'comment',
'user',
'sitemap',
'laptop',
'fork',
'info',
'bank',
'server',
'television',
);
?>
<li id="post-<?php esc_attr( the_ID() ); ?>" <?php post_class(); ?>>

<?php
<?php
while ( $loop->have_posts() ) {

$title = get_the_title();
$conference_names = get_post_meta( get_the_ID(), '_conference_name' );
$slide_url = get_post_meta( get_the_ID(), '_slide_url' );
$presentation_url = get_post_meta( get_the_ID(), '_presentation_url' );
$conference_url = get_post_meta( get_the_ID(), '_conference_url' );
$raw_presentation_date = get_post_meta( get_the_ID(), '_presentation_date' );
$conference_location = get_post_meta( get_the_ID(), '_conference_location' );
$icon = $icons[ $count % 6 ];
$count ++;
$loop->the_post();

?>
<li id="post-<?php esc_attr( the_ID() ); ?>" <?php post_class(); ?>>

<div class="entry-header">
<?php

<i class="list-icon icon-<?php echo esc_attr( $icon ); ?>"></i>
$title = get_the_title();
$conference_names = get_post_meta( get_the_ID(), '_conference_name' );
$slide_url = get_post_meta( get_the_ID(), '_slide_url' );
$presentation_url = get_post_meta( get_the_ID(), '_presentation_url' );
$conference_url = get_post_meta( get_the_ID(), '_conference_url' );
$raw_presentation_date = get_post_meta( get_the_ID(), '_presentation_date' );
$conference_location = get_post_meta( get_the_ID(), '_conference_location' );
$icon = $icons[ $count % 6 ];

<h3 class="entry-title"><?php echo esc_html( $title ); ?></h3>
?>

<?php foreach ( $conference_names as $index => $conference_name ) { ?>
<div class="entry-meta">
<div class="entry-header">

<?php
<i class="list-icon icon-<?php echo esc_attr( $icon ); ?>"></i>

if ( ! empty( $conference_name ) ) {
<h3 class="entry-title"><?php echo esc_html( $title ); ?></h3>

echo '<span class="speaking-conference" >';
<?php foreach ( $conference_names as $index => $conference_name ) { ?>
<div class="entry-meta">

if ( empty( $conference_url ) ) {
<?php

echo esc_html( $conference_name );
if ( ! empty( $conference_name ) ) {

} else {
echo '<span class="speaking-conference" >';

printf( '<a href="%s" title="%s" target="_blank">%s</a>', esc_url( $conference_url[ $index ] ), esc_attr( $conference_name[ $index ] ), esc_html( $conference_name ) );
if ( empty( $conference_url ) ) {

}
echo esc_html( $conference_name );

} else {

printf( '<a href="%s" title="%s" target="_blank">%s</a>', esc_url( $conference_url[ $index ] ), esc_attr( $conference_name[ $index ] ), esc_html( $conference_name ) );

echo '</span >';
}

}
echo '</span >';

if ( ! empty( $raw_presentation_date[ $index ] ) ) {
}

echo ' - <span class="speaking-date" >';
if ( ! empty( $raw_presentation_date[ $index ] ) ) {

echo esc_html( date( 'F Y', $raw_presentation_date[ $index ] ) );
echo ' - <span class="speaking-date" >';

echo '</span >';
}
echo esc_html( date( 'F Y', $raw_presentation_date[ $index ] ) );

if ( ! empty( $conference_location[ $index ] ) ) {
echo '</span >';
}

echo ' - <span class="speaking-location" >';
if ( ! empty( $conference_location[ $index ] ) ) {

echo esc_html( $conference_location[ $index ] );
echo ' - <span class="speaking-location" >';

echo '</span >';
}
echo esc_html( $conference_location[ $index ] );

if ( ! empty( $slide_url[ $index ] ) || ! empty( $presentation_url[ $index ] ) ) {
echo '</span >';
}

echo '<span class="presentation-links">';
if ( ! empty( $slide_url[ $index ] ) || ! empty( $presentation_url[ $index ] ) ) {

if ( ! empty( $slide_url[ $index ] ) ) {
echo '<span class="presentation-links">';

printf( '<span class="slide-link" ><a href="%s" title="%s" rel="bookmark">%s</a></span>', esc_url( $slide_url[ $index ] ), esc_attr( 'View slides from: ' . $title ), esc_attr__( 'View Slides', 'chriswiegman' ) );
if ( ! empty( $slide_url[ $index ] ) ) {

}
printf( '<span class="slide-link" ><a href="%s" title="%s" rel="bookmark">%s</a></span>', esc_url( $slide_url[ $index ] ), esc_attr( 'View slides from: ' . $title ), esc_attr__( 'View Slides', 'chriswiegman' ) );

if ( ! empty( $presentation_url[ $index ] ) ) {
}

printf( '<span class="presentation-link" ><a href="%s" title="%s" rel="bookmark">%s</a></span>', esc_url( $presentation_url[ $index ] ), esc_attr( 'Watch presentation: ' . $title ), esc_attr__( 'Watch Talk', 'chriswiegman' ) );
if ( ! empty( $presentation_url[ $index ] ) ) {

}
printf( '<span class="presentation-link" ><a href="%s" title="%s" rel="bookmark">%s</a></span>', esc_url( $presentation_url[ $index ] ), esc_attr( 'Watch presentation: ' . $title ), esc_attr__( 'Watch Talk', 'chriswiegman' ) );

echo '</span>';
}

}
echo '</span>';

?>
}

</div>
<?php } ?>
<!-- .entry-meta -->
?>

</div>
</div>
<?php } ?>
<!-- .entry-meta -->

<?php the_post_thumbnail( 'medium_large' ); ?>
</div>

<div class="entry-content">
<?php the_content(); ?>
</div>
<?php the_post_thumbnail( 'medium_large' ); ?>

<!-- .entry-header -->
<div class="divider"></div>
</li><!-- #post-## -->
<div class="entry-content">
<?php the_content(); ?>
</div>

<?php
<!-- .entry-header -->
<div class="divider"></div>
</li><!-- #post-## -->

}
wp_reset_postdata();
?>
<?php

</ul>
<!-- end .archive-projects-->
}
wp_reset_postdata();
?>

</div>
</ul>
<!-- end .archive-projects-->

</div>
</div>

<?php } // End of the loop.
?>
</article><!-- #post-## -->
</main>
<!-- #main -->
</div><!-- #primary -->
</div>

<?php get_sidebar(); ?>
<?php get_footer(); ?>
<?php
} // End of the loop.
?>
</article><!-- #post-## -->
</main>
<!-- #main -->
</div><!-- #primary -->

<?php
get_sidebar();
get_footer();

+ 25
- 18
page.php View File

@@ -11,28 +11,35 @@

namespace CW\Theme\Templates\Page;

get_header(); ?>
get_header();
?>

<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">

<?php while ( have_posts() ) : the_post(); ?>
<?php
while ( have_posts() ) :

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header><!-- .entry-header -->
the_post();
?>

<div class="entry-content">
<?php the_content(); ?>
</div><!-- .entry-content -->
</article><!-- #post-## -->
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header><!-- .entry-header -->

<?php endwhile; // End of the loop.
?>
<div class="entry-content">
<?php the_content(); ?>
</div><!-- .entry-content -->
</article><!-- #post-## -->

</main><!-- #main -->
</div><!-- #primary -->
<?php
endwhile; // End of the loop.
?>

<?php get_sidebar(); ?>
<?php get_footer(); ?>
</main><!-- #main -->
</div><!-- #primary -->

<?php
get_sidebar();
get_footer();

+ 23
- 22
search.php View File

@@ -13,41 +13,42 @@ namespace CW\Theme\Templates\Search;

use CW\Theme\Functions\Template_Tags;

get_header(); ?>
get_header();
?>

<section id="primary" class="content-area">
<main id="main" class="site-main" role="main">

<?php if ( have_posts() ) : ?>

<header class="page-header">
<h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'chriswiegman' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
</header><!-- .page-header -->
<?php
if ( have_posts() ) {
?>

<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<header class="page-header">
<h1 class="page-title"><?php printf( esc_html__( 'Search Results for: %s', 'chriswiegman' ), '<span>' . esc_html( get_search_query() ) . '</span>' ); ?></h1>
</header><!-- .page-header -->

<?php
/**
* Run the loop for the search to output the results.
* If you want to overload this in a child theme then include a file
* called content-search.php and that will be used instead.
*/
get_template_part( 'template-parts/content' );
?>
/* Start the Loop */
while ( have_posts() ) {
the_post();
get_template_part( 'template-parts/content' );
}

<?php endwhile; ?>
Template_Tags\paging_nav();

<?php Template_Tags\paging_nav(); ?>
} else {

<?php else : ?>
get_template_part( 'template-parts/content', 'none' );

<?php get_template_part( 'template-parts/content', 'none' ); ?>
}

<?php endif; ?>
?>

</main><!-- #main -->
</section><!-- #primary -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>
<?php
get_sidebar();
get_footer();

+ 21
- 21
single.php View File

@@ -13,12 +13,16 @@ namespace CW\Theme\Templates\Single;

use CW\Theme\Functions\Template_Tags;

get_header(); ?>
get_header();
?>

<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">

<?php while ( have_posts() ) : the_post(); ?>
<?php
while ( have_posts() ) {
the_post();
?>

<article id="post-<?php esc_attr( the_ID() ); ?>" <?php post_class(); ?>>
<?php
@@ -85,17 +89,17 @@ get_header(); ?>

}

echo '<div class="author-box">' . PHP_EOL;
echo '<div class="author-box">';

echo get_avatar( get_the_author_meta( 'ID' ), 100 );

if ( strlen( get_the_author_meta( 'url' ) ) > 1 ) {
echo '<strong>About <a href="' . esc_url( get_the_author_meta( 'url' ) ) . '" target="_blank" title="' . esc_attr( get_the_author_meta( 'website_title' ) ) . '">' . esc_html( get_the_author_meta( 'display_name' ) ) . '</a></strong>' . PHP_EOL;
echo '<strong>About <a href="' . esc_url( get_the_author_meta( 'url' ) ) . '" target="_blank" title="' . esc_attr( get_the_author_meta( 'website_title' ) ) . '">' . esc_html( get_the_author_meta( 'display_name' ) ) . '</a></strong>';
} else {
echo '<strong>About ' . esc_html( get_the_author_meta( 'display_name' ) ) . '</strong>' . PHP_EOL;
echo '<strong>About ' . esc_html( get_the_author_meta( 'display_name' ) ) . '</strong>';
}

echo '<p>' . wp_kses_post( get_the_author_meta( 'description' ) ) . '</p>' . PHP_EOL;
echo '<p>' . wp_kses_post( get_the_author_meta( 'description' ) ) . '</p>';

if (
(
@@ -164,14 +168,13 @@ get_header(); ?>
)
) {

echo '<p id="authcontact">Follow ' . esc_attr( get_the_author_meta( 'first_name' ) ) . ' on <a href="http://twitter.com/' . $profiles['twitter']['url'] . '" target="_blank" title="' . esc_attr( get_the_author_meta( 'display_name' ) ) . ' on Twitter">Twitter</a></p>' . PHP_EOL;
echo '<p id="authcontact">Follow ' . esc_attr( get_the_author_meta( 'first_name' ) ) . ' on <a href="http://twitter.com/' . $profiles['twitter']['url'] . '" target="_blank" title="' . esc_attr( get_the_author_meta( 'display_name' ) ) . ' on Twitter">Twitter</a></p>';

} else {

echo '<p id="authcontact">Find ' . esc_html( get_the_author_meta( 'first_name' ) ) . ' on ';

$output = '';
$links = array();
$links = array();

if (
isset( $profiles['facebook'] ) &&
@@ -251,30 +254,27 @@ get_header(); ?>

}

echo '.</p>' . PHP_EOL;
echo '.</p>';

} // End if().
} // End if().

echo '</div>' . PHP_EOL;

?>
echo '</div>';

<?php
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || 0 !== get_comments_number() ) :
if ( comments_open() || 0 !== get_comments_number() ) {
comments_template();
endif;
?>
}

<?php Template_Tags\post_nav(); ?>
Template_Tags\post_nav();

<?php endwhile; // End of the loop.
} // End of the loop.
?>

</main>
<!-- #main -->
</div><!-- #primary -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>
<?php
get_sidebar();
get_footer();