broker_notifications_archive.php
2.04 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<?php
/*
* Template Name: Broker notifications archive
*/
global $user_ID;
get_currentuserinfo();
if (!$user_ID) {
auth_redirect();
}
?>
<?php get_header("brokerlanding");
global $wpdb;
?>
<div id="brokercontent">
<style>h2{
text-transform: lowercase !important;
}</style>
<div class="row">
<?php include_once('broker_sidebar.php'); ?>
<!-- Use any element to open the sidenav -->
</div>
<div class="row">
<?php include_once('broker_sidebar_tab.php'); ?>
</div>
<div id="page-content">
<h5 style="text-transform:uppercase;"><?php the_title(); ?></h5>
<div class="col-md-9">
<?php $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
$custom_args = array(
'post_type' => 'notifications',
'posts_per_page' => 2,
'paged' => $paged
);
$custom_query = new WP_Query( $custom_args ); ?>
<?php if ( $custom_query->have_posts() ) : ?>
<!-- the loop -->
<?php while ( $custom_query->have_posts() ) : $custom_query->the_post(); ?>
<article class="loop">
<h3><?php the_title(); ?></h3>
<div class="content">
<?php the_excerpt(); ?>
</div>
</article>
<?php endwhile; ?>
<!-- end of the loop -->
<!-- pagination here -->
<?php
if (function_exists(custom_pagination)) {
custom_pagination($custom_query->max_num_pages,"",$paged);
}
?>
<?php wp_reset_postdata(); ?>
<?php else: ?>
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
<?php endif; ?>
</div>
<?php
if (function_exists(clean_custom_menus())) {
clean_custom_menus();
}
?>
</div>
</div>
</div>
<?php wp_nav_menu(
array(
'theme_location' => 'broker-footer',
'container' => 'nav',
'container_id' => 'broker-footer',
)
);
?>
<style>
html {
margin-top : 32px !important;
}
</style>
<?php get_footer(); ?>