Sketch: Add page password protection for portfolio page (#6012)
* Sketch: Add page password protection for portfolio items on the portfolio page * Wrap password protection form with the container for consistent styling
This commit is contained in:
parent
7928eb88df
commit
7a745e2e04
1 changed files with 50 additions and 33 deletions
|
@ -16,20 +16,35 @@ get_header(); ?>
|
|||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( post_password_required() ) : ?>
|
||||
|
||||
<?php the_title( '<header class="page-header"><h1 class="page-title">', '</h1></header>' ); ?>
|
||||
|
||||
<div class="page-content">
|
||||
<?php the_content(); ?>
|
||||
</div><!-- .page-content -->
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<?php if ( ! get_theme_mod( 'sketch_hide_portfolio_page_content' ) ) : ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
<?php
|
||||
while ( have_posts() ) :
|
||||
the_post();
|
||||
?>
|
||||
|
||||
<?php the_title( '<header class="page-header"><h1 class="page-title">', '</h1></header>' ); ?>
|
||||
|
||||
<div class="page-content">
|
||||
<?php
|
||||
the_content();
|
||||
wp_link_pages( array(
|
||||
wp_link_pages(
|
||||
array(
|
||||
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'sketch' ) . '</span>',
|
||||
'after' => '</div>',
|
||||
'link_before' => '<span>',
|
||||
'link_after' => '</span>',
|
||||
) );
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?php edit_post_link( __( 'Edit', 'sketch' ), '<div class="entry-meta"><span class="edit-link">', '</span></div>' ); ?>
|
||||
|
||||
|
@ -63,7 +78,8 @@ get_header(); ?>
|
|||
<div class="projects clear">
|
||||
|
||||
<?php
|
||||
while ( $project_query -> have_posts() ) : $project_query -> the_post();
|
||||
while ( $project_query->have_posts() ) :
|
||||
$project_query->the_post();
|
||||
|
||||
get_template_part( 'content', 'portfolio' );
|
||||
|
||||
|
@ -98,6 +114,7 @@ get_header(); ?>
|
|||
</section><!-- .no-results -->
|
||||
|
||||
<?php endif; ?>
|
||||
<?php endif; // end post_password_required() ?>
|
||||
|
||||
</main><!-- #main -->
|
||||
</div><!-- #primary -->
|
||||
|
|
Loading…
Add table
Reference in a new issue