-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Coding standards no arquivo template-fullwidth.php
- Loading branch information
1 parent
514751f
commit 19cd0dd
Showing
1 changed file
with
27 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,35 @@ | ||
<?php | ||
|
||
/** | ||
*Template Name: Full Width | ||
* Template Name: Full Width | ||
* | ||
* @link https://developer.wordpress.org/themes/template-files-section/page-template-files/ | ||
* | ||
* @package coletivo | ||
*/ | ||
|
||
get_header(); ?> | ||
|
||
<?php if( has_post_thumbnail() && $img = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full', true ) ) : ?> | ||
<div class="image-fullheader"> | ||
<img src="<?php echo esc_url( $img[0] ); ?>" alt="<?php the_title(); ?>"> | ||
</div><!-- image-fullheader --> | ||
<?php endif; ?> | ||
<div id="content" class="container"> | ||
<?php the_title( '<h2 class="fullheader-title">', '</h2>' ); ?> | ||
<div id="fullwidth" class="content-area"> | ||
|
||
<?php while ( have_posts() ) : the_post(); ?> | ||
|
||
<?php get_template_part( 'template-parts/content', 'page' ); ?> | ||
|
||
<?php | ||
// 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; | ||
?> | ||
|
||
<?php endwhile; // End of the loop. ?> | ||
|
||
</div><!-- #fullwidth --> | ||
</div><!-- #content --> | ||
|
||
<?php get_footer(); ?> | ||
<?php if ( has_post_thumbnail() && $img = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full', true ) ) : ?> | ||
<div class="page-fullheader"> | ||
<img src="<?php echo esc_url( $img[0] ); ?>" alt="<?php the_title(); ?>"> | ||
</div><!-- .page-fullheader --> | ||
<?php endif; ?> | ||
|
||
<div id="content" class="container"> | ||
<?php the_title( '<h2 class="fullheader-title">', '</h2>' ); ?> | ||
<div id="fullwidth" class="content-area"> | ||
|
||
<?php | ||
while ( have_posts() ) : the_post(); | ||
get_template_part( 'template-parts/content', 'page' ); | ||
// 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; | ||
endwhile; // End of the loop. | ||
?> | ||
|
||
</div><!-- #fullwidth --> | ||
</div><!-- #content --> | ||
|
||
<?php get_footer(); |