Esempio n. 1
0
business-directory" id="bbhome">Home</a></li>
            <li class="busdiradd"><input type="submit" class="submit bright" value="Add new Deal" /></li>
            <li class="busdirshow"><select size="1" name="search_deals_length"><option value="10">10</option><option value="25">25</option><option value="50">50</option><option value="100">100</option></select></li>
            <li class="busdirsearch"><input type="text" id="acpro_inp1"></li>
            </ul>
        </section>
    </form>
    <?php 
$deals = new WP_Query();
$deals->Query('post_type=dealentry&post_status=publish&posts_per_page=-1');
if ($deals->have_posts()) {
    ?>
    <div style="clear: both;"> </div>
    <table id="search_deals">
      <?php 
    build_deals_head();
    ?>
      <tbody>
        <?php 
    while ($deals->have_posts()) {
        $deals->the_post();
        // the loop
        global $post;
        $post_id = $post->ID;
        build_deals_row($post_id);
    }
    ?>
      </tbody>
    </table>
    <div style="clear: both;"> </div>
    <?php 
Esempio n. 2
0
function deals_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>Deals Search Results</h1>	
	
		<form class="wpsc_checkout_forms" enctype="multipart/form-data" method="post" action="<?php 
    echo get_bloginfo('siteurl') . '/new-deal/';
    ?>
">
		<div class="row">
	    	 <div style="text-align: right; width: 90%;">
			<input type="submit" class="submit bright" value="ADD NEW DEAL" /><br/><br/>
			</div>
	    </div>							
		</form>			
		
		
		<?php 
    if (have_posts()) {
        ?>
		
		<div style="clear: both;"> </div>
			<table id="search_deals">
			<?php 
        build_deals_head();
        ?>
		
			<tbody>
			
		<?php 
        while (have_posts()) {
            the_post();
            // the loop
            global $post;
            $post_id = $post->ID;
            build_deals_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();
}