broker_notifications_archive.php 2.04 KB
<?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(); ?>