Commit e22dd314 authored by Michael Ochmann's avatar Michael Ochmann
Browse files

added template for pages that should only be accessible to logged in users

parent d82f38ec
<?php
/**
* Template Name: Login
*
* @package WordPress
* @subpackage Fachschaft Informatik
* @since Fachschaft Informatik 2.0.0
*/
get_header();
?>
<main>
<section class="row">
<section class="col-md-8 col-lg-9">
<?php
if (!is_user_logged_in()) {
echo "
<fsi-tile class=\"page\">
<fsi-title>Zugriff verweigert!</fsi-title>
<fsi-subtitle>Bitte einloggen</fsi-subtitle>
<article class=\"page\">
<p style=\"margin: 100px 0;\">
<h2>Um auf diese Seite zuzugreifen musst du eingeloggt sein.</h2>
</p>
<p style='margin: 50px 0;'>
<a href='https://fsi.hochschule-trier.de/wp-login.php?action=shibboleth' class='btn btn-lg center-block btn-primary'>Login</a>
</p>
</article>
</fsi-tile>
";
}
else {
if (have_posts()) {
while (have_posts()) {
the_post();
echo "
<fsi-tile class=\"page\">
<fsi-title>".get_the_title()."</fsi-title>
<fsi-subtitle> Version vom ".get_the_date()."</fsi-subtitle>
<article class=\"page\" lang='de'>";
the_content();
echo "
</article>
<div style='clear: both;'></div>
</fsi-tile>
";
}
}
}
?>
</section>
<section class="col-md-4 col-lg-3">
<fsi-tile class="sidebar">
<?php get_sidebar('sidebar-1'); ?>
</fsi-tile>
</section>
</section>
</main>
<?php get_footer(); ?>
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment