Support » Themes and Templates » [TwentyFourteen] Template for password protected pages

  • Hi!

    I haven’t got too much experience with themes and templates in WordPress. I’ve found a template for password protected sites, originally to be found at This wouldn’t work well with TwentyFourteen, because it would be covered by the secondary navigation.

    So, I’ve tried to adapt the template by adding some parts of page templates of the original TwentyFourteen theme. Now, the content doesn’t display at the right position. Moreover, the secondary menu is way off to the left side. The site I’ve used the template on is

    Any ideas where I was wrong?

    * Template Name: Passwortgeschütze Seite
    <div id="main-content" class="main-content">
    	<div id="primary" class="content-area">
    		<div id="content" class="site-content" role="main">
    								the_post(); ?>
    									<h2><a href="<?php the_permalink() ?>" title="Seite: <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    									<?php if(post_password_required()) { ?>
    										Hier könnt ihr euren Besuchern mitteilen, dass zur Ansicht der Seite ein Passwort nötig ist. 
    									<form method="post" action="/wp-login.php?action=postpass">
    											<label for="pwbox-<?php the_ID(); ?>">Passwort:</label>
    											<input id="pwbox-<?php the_ID(); ?>" type="password" name="post_password"/>
    											<input type="submit" value="Anmelden" name="Submit" />
    									<?php } else { ?>
    									<?php the_content(); ?>
    									<?php } ?>
  • The topic ‘[TwentyFourteen] Template for password protected pages’ is closed to new replies.