Пример #1
0
	<?php 
/**
 * wps_deals_before_main_content hook
 *
 * @hooked wps_deals_output_content_wrapper - 10 (outputs opening divs for the content)
 * @hooked wps_deals_breadcrumb - 20
 */
do_action('wps_deals_before_main_content');
?>
	
	<?php 
if (apply_filters('wps_deals_show_page_title', true)) {
    ?>

		<h1 class="page-title"><?php 
    wps_deals_page_title();
    ?>
</h1>

	<?php 
}
?>
	
	<div class="deals-archive <?php 
echo $deal_size;
?>
 deals-row">
	
		<?php 
do_action('wps_deals_archive_description');
?>
 /**
  * Output Deals content.
  * 
  * This function is only used in the optional 'deals-engine.php' template
  * which people can add to their themes to add basic deals support
  * without hooks or modifying core templates.
  * 
  * @package Social Deals Engine
  * @since 2.0.6
  **/
 function deals_content()
 {
     global $wps_deals_options;
     // get deal size
     $deal_size = $wps_deals_options['deals_size_archive'];
     if (is_single() && get_post_type() == WPS_DEALS_POST_TYPE) {
         //do_action( 'wps_deals_before_main_content' );
         do_action('wps_deals_theme_before_main_content');
         if (have_posts()) {
             while (have_posts()) {
                 the_post();
                 wps_deals_get_template('content-single-deal.php');
                 comments_template('', true);
             }
         }
         //do_action( 'wps_deals_after_main_content' );
     } elseif (is_post_type_archive(WPS_DEALS_POST_TYPE) || is_tax(WPS_DEALS_POST_TAXONOMY) || is_tax(WPS_DEALS_POST_TAGS)) {
         if (apply_filters('wps_deals_show_page_title', true)) {
             echo '<h1 class="page-title">' . wps_deals_page_title() . '</h1>';
         }
         echo '<div class="deals-archive ' . $deal_size . ' deals-row">';
         do_action('wps_deals_theme_before_main_content');
         do_action('wps_deals_archive_description');
         do_action('wps_deals_archive_deals');
         echo '</div>';
     }
 }