1 | <?php |
||
2 | /** |
||
3 | * The template for displaying Exercise Type Archives. |
||
4 | * |
||
5 | * @package lsx-health-plan |
||
6 | */ |
||
7 | |||
8 | get_header(); ?> |
||
9 | |||
10 | <?php lsx_content_wrap_before(); ?> |
||
11 | |||
12 | <?php |
||
13 | $page_id = get_the_ID(); |
||
14 | $redirect = '/content-restricted/?r=' . $page_id . '&wcm_redirect_to=archive&wcm_redirect_id=' . $page_id; |
||
15 | ?> |
||
16 | |||
17 | <div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>"> |
||
18 | |||
19 | <?php lsx_content_before(); ?> |
||
20 | |||
21 | <!-- Begining restricted content --> |
||
22 | <?php |
||
23 | if ( ! function_exists( 'wc_memberships_view_restricted_post_content' ) || current_user_can( 'wc_memberships_view_restricted_post_content', $post_id ) ) { |
||
0 ignored issues
–
show
Coding Style
introduced
by
![]() |
|||
24 | ?> |
||
25 | <main id="main" role="main"> |
||
26 | |||
27 | <?php lsx_content_top(); ?> |
||
28 | |||
29 | <div class="post-wrapper exercise-archive-plan archive-plan"> |
||
30 | <div class="row"> |
||
31 | <?php if ( have_posts() ) : ?> |
||
32 | <?php |
||
33 | while ( have_posts() ) : |
||
34 | the_post(); |
||
35 | ?> |
||
36 | |||
37 | <?php include LSX_HEALTH_PLAN_PATH . '/templates/content-archive-exercise.php'; ?> |
||
38 | |||
39 | <?php endwhile; ?> |
||
40 | |||
41 | <?php else : ?> |
||
42 | |||
43 | <?php get_template_part( 'partials/content', 'none' ); ?> |
||
44 | |||
45 | <?php endif; ?> |
||
46 | </div> |
||
47 | <?php lsx_paging_nav(); ?> |
||
48 | </div> |
||
49 | <?php lsx_content_bottom(); ?> |
||
50 | |||
51 | </main><!-- #main --> |
||
52 | |||
53 | <?php |
||
54 | } else { |
||
55 | wp_redirect( $redirect ); |
||
56 | exit; |
||
57 | } |
||
58 | ?> |
||
59 | |||
60 | <?php lsx_content_after(); ?> |
||
61 | |||
62 | </div><!-- #primary --> |
||
63 | |||
64 | <?php lsx_content_wrap_after(); ?> |
||
65 | |||
66 | <?php //get_sidebar(); ?> |
||
67 | |||
68 | <?php |
||
69 | get_footer(); |
||
70 |