martcol

WPBD Listing Listings

Dec 7th, 2012
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.72 KB | None | 0 0
  1. <?php
  2. /** Template Name: listlistings.php
  3.  *
  4.  
  5.  */
  6.  
  7. get_header(); ?>
  8.  
  9. <section id="primary" class="span8">   
  10.     <?php tha_content_before(); ?>
  11.     <div id="content" role="main">
  12.         <?php tha_content_top(); ?>
  13.         <div id="wpbdmentry">
  14. <?php
  15.  
  16. if(!isset($excludebuttons))
  17. {?>
  18.     <div id="lco">
  19.     <div class="title"><?php print(wpbusdirman_post_menu_button_submitlisting());?>
  20.     <?php print(wpbusdirman_post_menu_button_directory());?></div>
  21.     <div class="button" style="margin:0;padding:0;"></div>
  22. <div style="clear:both;"></div></div>
  23.  
  24. <?php }
  25.  
  26. include(WPBUSDIRMAN_TEMPLATES_PATH . '/wpbusdirman-template-globals.php');
  27.  
  28. // Display featured/sticky listings
  29. $wpbdmisindex=1;
  30. include(WPBUSDIRMAN_TEMPLATES_PATH . '/wpbusdirman-sticky-loop.php');
  31.  
  32.  
  33. // Display regular listings
  34.     $args=array(
  35.       'post_type' => $wpbdmposttype,
  36.       'post_status' => 'publish',
  37.     'paged'=>$paged,
  38.     'orderby'=>$wpbdmorderlistingsby,
  39.     'order'=>$wpbdmsortorderlistings,
  40.     'post__not_in' => $ids
  41.     );
  42.     query_posts($args);
  43.  
  44.     if ( have_posts() )
  45.     { $count = 0;
  46.         while ( have_posts() )
  47.         {
  48.             the_post();$count++;
  49.             print(wpbusdirman_the_listing_title($count));
  50.         }
  51. ?>
  52.     <div class="navigation">
  53. <?php
  54.         if(function_exists('wp_pagenavi'))
  55.         {
  56.             wp_pagenavi();
  57.         }
  58.         elseif(function_exists('wp_paginate'))
  59.         {
  60.             wp_paginate();
  61.         }
  62.         else
  63.         {
  64. ?>
  65.         <div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
  66.         <div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
  67. <?php
  68.         }
  69. ?>
  70.     </div>
  71. <?php
  72.     }
  73.     else
  74.     {
  75. ?>
  76.     <p><?php _e("There were no listings found in the directory","WPBDM"); ?></p>
  77. <?php
  78.     }
  79.     wp_reset_query();
  80. ?>
  81. </div>
  82.         <nav id="nav-single" class="pager">
  83.             <h3 class="assistive-text"><?php _e( 'Post navigation', 'the-bootstrap' ); ?></h3>
  84.             <span class="next"><?php next_post_link( '%link', sprintf( '%1$s <span class="meta-nav">&rarr;</span>', __( 'Next Post', 'the-bootstrap' ) ) ); ?></span>
  85.             <span class="previous"><?php previous_post_link( '%link', sprintf( '<span class="meta-nav">&larr;</span> %1$s', __( 'Previous Post', 'the-bootstrap' ) ) ); ?></span>
  86.         </nav><!-- #nav-single -->
  87.        
  88.         <?php tha_content_bottom(); ?>
  89.         <div class="google">
  90.         <script type="text/javascript"><!--
  91. google_ad_client = "ca-pub-7807678894997074";
  92. /* Page Ad */
  93. google_ad_slot = "2651375015";
  94. google_ad_width = 728;
  95. google_ad_height = 90;
  96. //-->
  97. </script>
  98. <script type="text/javascript"
  99. src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
  100. </script>
  101.         </div>
  102.  
  103.     </div><!-- #content -->
  104.     <?php tha_content_after(); ?>
  105. </section><!-- #primary -->
  106.  
  107. <?php
  108. get_sidebar();
  109. get_footer();
  110.  
  111.  
  112. /* End of file index.php */
  113. /* Location: ./wp-content/themes/the-bootstrap/single.php */
Advertisement
Add Comment
Please, Sign In to add comment