Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
FSI WordPress
FSI WordPress Theme V2
Commits
e22dd314
Commit
e22dd314
authored
Oct 14, 2016
by
Michael Ochmann
Browse files
added template for pages that should only be accessible to logged in users
parent
d82f38ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
template.onlyLoggedIn.php
0 → 100644
View file @
e22dd314
<?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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment