Пример #1
0
$deals->Query('post_type=businessentry&post_status=publish&posts_per_page=-1');
if ($deals->have_posts()) {
    ?>
    <div style="clear: both;"> </div>
    <table id="search_deals">
      <?php 
    business_directory_head();
    ?>
      <tbody>
        <?php 
    while ($deals->have_posts()) {
        $deals->the_post();
        // the loop
        global $post;
        $post_id = $post->ID;
        build_business_directory_row($post_id);
    }
    ?>
      </tbody>
    </table>
    <div style="clear: both;"> </div>
    <?php 
}
/** end loop **/
?>
		
  </div>
  <!-- #content -->
  
  <?php 
do_action('genesis_after_content');
Пример #2
0
function business_search_loop()
{
    global $wpdb;
    get_header();
    do_action('genesis_before_content_sidebar_wrap');
    ?>
	
	<!-- Table Scripts -->
	<script type="text/javascript" language="javascript" src="<?php 
    echo bloginfo('stylesheet_directory') . "/media/js/jquery.js";
    ?>
"></script>
	<script type="text/javascript" language="javascript" src="<?php 
    echo bloginfo('stylesheet_directory') . "/media/js/jquery.dataTables.js";
    ?>
"></script>	
	<script type="text/javascript" charset="utf-8">

		$(document).ready(function() {
			$('#search_deals').dataTable();
		} );
	
	</script>	
		
	<div id="content-sidebar-wrap">
		<?php 
    do_action('genesis_before_content');
    ?>
		<div id="content" class="hfeed">
	
		<h1>Business Directory Search Results</h1>	
	
		<form class="wpsc_checkout_forms" enctype="multipart/form-data" method="post" action="<?php 
    echo get_bloginfo('siteurl') . '/new-business/';
    ?>
">
		<div class="row">
	    	 <div style="text-align: right; width: 90%;">
			<input type="submit" class="submit bright" value="ADD NEW BUSINESS" /><br/><br/>
			</div>
	    </div>							
		</form>			
		
		
		<?php 
    if (have_posts()) {
        ?>
		
		<div style="clear: both;"> </div>
			<table id="search_deals">
			<?php 
        business_directory_head();
        ?>
		
			<tbody>
			
		<?php 
        while (have_posts()) {
            the_post();
            // the loop
            global $post;
            $post_id = $post->ID;
            build_business_directory_row($post_id);
        }
        /** end of one post **/
        ?>
	
		</tbody>
		</table>
		<div style="clear: both;"> </div>

	
		<?php 
    } else {
        /** if no posts exist **/
        do_action('genesis_loop_else');
    }
    /** end loop **/
    ?>
		</div><!-- #content -->
		<?php 
    do_action('genesis_after_content');
    ?>
	</div><!-- #content-sidebar-wrap -->
		<?php 
    do_action('genesis_after_content_sidebar_wrap');
    get_footer();
}