Skip to content

Instantly share code, notes, and snippets.

@daviddarke
Created August 6, 2018 09:33
Show Gist options
  • Save daviddarke/991347f6fcffc6e90d0e8cfe42918e86 to your computer and use it in GitHub Desktop.
Save daviddarke/991347f6fcffc6e90d0e8cfe42918e86 to your computer and use it in GitHub Desktop.
<?php get_header();
if ( post_password_required( $post->ID ) ) {
echo get_the_password_form();
} else {
while ( have_posts() ) : the_post();
$meta = get_post_meta($post->ID);
?>
<?php echo trim($meta['story_body'][0]); ?>
<div id="extraHTML">
<?php echo trim($meta['extra_html'][0]); ?>
</div>
<style type="text/css">
<?php echo get_option('sh_css'); ?>
</style>
<?php
endwhile;
}
get_footer(); ?>
@daviddarke
Copy link
Author

daviddarke commented Aug 6, 2018

Added a post_password_required() check and then output get_the_password_form() if true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment