-
Notifications
You must be signed in to change notification settings - Fork 0
/
vm_userPostSubmit.php
42 lines (30 loc) · 1.01 KB
/
vm_userPostSubmit.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/* Template Name: vm_userPostSubmit */
get_header();
the_post();
$vm_userMustBeLoggedIn = get_post_meta(get_the_ID(), "vm_userMustBeLoggedIn", true);
?>
<div class='container'>
<div class='row'>
<div class='col-lg-8'>
<div class="mt-4 pb-4">
<h1 class='mt-4'><?php single_post_title(); ?></h1>
<?php if (function_exists('user_submitted_posts') && is_user_logged_in()): ?>
<div class='mt-4'><?php the_content(); ?></div>
<?php
user_submitted_posts();
else:
?>
<p class="mt-4 pb-2"><?php echo $vm_userMustBeLoggedIn; ?></p>
<div class="vm_alignFlex">
<a href="<?php echo wp_login_url(get_permalink(get_the_ID())); ?>" class="btn btn-primary">Přihlásit se</a>
<a href="<?php echo get_site_url(null,'/registrace'); ?>">Registrace</a>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
<?php
get_footer();