-
Notifications
You must be signed in to change notification settings - Fork 0
/
page.php
42 lines (42 loc) · 1.35 KB
/
page.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
/**
* The template for displaying pages
* @package injob
*/
get_header();
global $post, $wp;
$current_url = home_url( add_query_arg( array(), $wp->request ) );
?>
<div class="contents-main" id="contents-main">
<div class="container">
<div class="row">
<?php
$public_page = get_post_meta( $post->ID, 'inwave_public_page', true );
if ( ! $public_page || ( $public_page && is_user_logged_in() ) ) { ?>
<div class="<?php echo esc_attr( inwave_get_classes( 'container', '', 'medium' ) ) ?>">
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', 'page' ); ?>
<?php
// If comments are open or we have at least one comment, load up the comment template
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
?>
<?php endwhile; // end of the loop. ?>
</div>
<?php
} else {
if ( class_exists( 'IWJ_Class' ) ) {
$login_page_id = get_permalink( iwj_option( 'login_page_id' ) );
} else {
$login_page_id = wp_login_url();
} ?>
<div class="iwj-candidate-non-permission">
<?php echo sprintf( __( 'You must be logged in to view this page. <a href="%s">Login here</a>', 'injob' ), add_query_arg( 'redirect_to', $current_url, $login_page_id ) ); ?>
</div>
<?php
} ?>
</div>
</div>
</div>
<?php get_footer(); ?>