Skip to content

Instantly share code, notes, and snippets.

@usm-interactive
Created June 21, 2021 21:25
Show Gist options
  • Save usm-interactive/7baa456b0416239859605bc31f27a921 to your computer and use it in GitHub Desktop.
Save usm-interactive/7baa456b0416239859605bc31f27a921 to your computer and use it in GitHub Desktop.
Prana Page Builder with post_password_required() builtin
<?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