Created
June 21, 2021 21:25
-
-
Save usm-interactive/7baa456b0416239859605bc31f27a921 to your computer and use it in GitHub Desktop.
Prana Page Builder with post_password_required() builtin
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
<?php | |
/** | |
* The template for displaying all pages | |
* | |
* This is the template that displays all pages by default. | |
* Please note that this is the WordPress construct of pages | |
* and that other 'pages' on your WordPress site may use a | |
* different template. | |
* | |
* @link https://codex.wordpress.org/Template_Hierarchy | |
* | |
* @package Prana | |
*/ | |
get_header(); ?> | |
<?php while ( have_posts() ) : the_post(); ?> | |
<?php get_template_part( 'template-parts/partial', 'page-banner' ); ?> | |
<?php if ( !post_password_required()): | |
get_template_part( 'template-parts/content', 'page-builder' ); | |
else: | |
the_content(); | |
endif; ?> | |
<?php endwhile; ?> | |
<?php | |
get_footer(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment