-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c0c6033
commit 9577d39
Showing
3 changed files
with
131 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
/** | ||
* The template for displaying all single posts | ||
* | ||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post | ||
* | ||
* @package StanleyWP | ||
*/ | ||
|
||
get_header(); ?> | ||
|
||
|
||
<div id="primary" class="content-area-full"> | ||
<main id="main" class="site-main" role="main"> | ||
|
||
<?php | ||
while ( have_posts() ) : the_post(); | ||
|
||
get_template_part( 'template-parts/content', 'project' ); ?> | ||
|
||
<div class="container"> | ||
<div class="row justify-content-center"> | ||
<div class="col-md-8"> | ||
<?php //the_post_navigation(); | ||
|
||
// If comments are open or we have at least one comment, load up the comment template. | ||
if ( comments_open() || get_comments_number() ) : | ||
comments_template(); | ||
endif; ?> | ||
|
||
</div><!-- .col-md-8 --> | ||
</div><!-- .row --> | ||
</div><!-- .container --> | ||
|
||
<?php endwhile; // End of the loop. ?> | ||
|
||
</main><!-- #main --> | ||
</div><!-- #primary --> | ||
|
||
<?php | ||
get_footer(); |
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 |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?php | ||
/** | ||
* Template part for displaying posts | ||
* | ||
* @link https://codex.wordpress.org/Template_Hierarchy | ||
* | ||
* @package StanleyWP | ||
*/ | ||
|
||
?> | ||
|
||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> | ||
|
||
<div class="container"> | ||
<div class="row justify-content-center text-center"> | ||
<div class="col-md-6"> | ||
|
||
<header class="entry-header"> | ||
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> | ||
</header><!-- .entry-header --> | ||
|
||
<div class="entry-content"> | ||
<?php | ||
the_content( sprintf( | ||
/* translators: %s: Name of current post. */ | ||
wp_kses( __( 'Continue reading %s <span class="meta-nav">→</span>', 'stanleywp' ), array( 'span' => array( 'class' => array() ) ) ), | ||
the_title( '<span class="screen-reader-text">"', '"</span>', false ) | ||
) ); | ||
|
||
wp_link_pages( array( | ||
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'stanleywp' ), | ||
'after' => '</div>', | ||
) ); | ||
?> | ||
</div><!-- .entry-content --> | ||
|
||
</div><!-- .col-md-6 --> | ||
</div><!-- .row --> | ||
|
||
|
||
<div class="row justify-content-center"> | ||
<div class="col-md-8"> | ||
|
||
<?php | ||
// Get the list of files | ||
$files = get_post_meta( get_the_ID(), '_stanleywp_images', 1 ); | ||
|
||
// Loop through them and output an image | ||
foreach ( (array) $files as $attachment_id => $attachment_url ) { | ||
echo '<div class="mb-4">'; | ||
echo wp_get_attachment_image( $attachment_id, 'full' ); | ||
echo '</div>'; | ||
} | ||
?> | ||
|
||
</div><!-- .col-md-8 --> | ||
</div><!-- .row --> | ||
|
||
|
||
<footer class="entry-footer"> | ||
<?php stanleywp_entry_footer(); ?> | ||
</footer><!-- .entry-footer --> | ||
|
||
|
||
</div><!-- .container --> | ||
|
||
</article><!-- #post-## --> |