Example #1
0
 }
 if ($style === 'tab' && !empty($sub_cats)) {
     wp_reset_postdata();
     $output .= '</div>';
     foreach ($sub_cats as $cat) {
         $args['category_name'] = $cat->slug;
         $cat_r = new WP_Query($args);
         if ($cat_r->have_posts()) {
             $output .= '<div id="' . $id . $cat->term_id . '" class="latestnews-tab-content fade">';
             $highlighted = false;
             while ($cat_r->have_posts()) {
                 $cat_r->the_post();
                 global $post;
                 if (!$highlighted) {
                     $highlighted = true;
                     $output .= '<article itemtype="' . dh_get_protocol() . '://schema.org/Article" itemscope="" class="latestnews-leading">';
                     $output .= '<div class="latestnews-thumb">';
                     $output .= '<a href="' . esc_url(get_the_permalink()) . '" title="' . esc_attr(get_the_title()) . '">';
                     $output .= get_the_post_thumbnail(null, 'dh-thumbnail', array('data-itemprop' => 'image', 'title' => esc_attr(get_the_title())));
                     $output .= '</a>';
                     $output .= '</div>';
                     $output .= '<h2 data-itemprop="name">';
                     $output .= '<a data-itemprop="url" title="' . esc_attr(get_the_title()) . '" href="' . esc_url(get_the_permalink()) . '">' . get_the_title() . '</a>';
                     $output .= '</h2>';
                     if ($show_comment || $show_date) {
                         $output .= '<div class="entry-meta">';
                         $output .= dh_post_meta($show_date, $show_comment, false, false, false, '|', 'M j,Y');
                         $output .= '</div>';
                     }
                     if (empty($hide_excerpt)) {
                         $output .= '<div class="excerpt">';
Example #2
0
        ?>
									<?php 
        if ($layout == 'grid' && $k++ % $columns == 0) {
            ?>
									<div class="hentry-row">
									<?php 
        }
        ?>
									<article id="post-<?php 
        the_ID();
        ?>
" <?php 
        post_class($post_class . $post_col . $post_timeline_class);
        ?>
 itemtype="<?php 
        echo dh_get_protocol();
        ?>
://schema.org/Article" itemscope="">
										
										<?php 
        if ($layout == 'timeline') {
            ?>
										<div class="timeline-badge">
											<a title="<?php 
            echo get_the_date('F j, Y g:i a');
            ?>
"><i class="fa fa-dot-circle-o"></i><span><?php 
            echo get_the_date('F j, Y g:i a');
            ?>
</span></a>
										</div>
Example #3
0
function dh_enqueue_theme_script()
{
    $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
    if (is_singular()) {
        wp_enqueue_script('comment-reply');
    }
    if (defined('WOOCOMMERCE_VERSION')) {
        wp_enqueue_script('wc-add-to-cart-variation');
    } else {
        wp_enqueue_script('vendor-cookie', get_template_directory_uri() . '/assets/vendor/jquery.cookie' . $suffix . '.js', array('jquery'), '1.4.1', false);
    }
    //wp_register_script('dh', get_template_directory_uri().'/assets/js/script'.$suffix.'.js',array('jquery','vendor-easing','vendor-infinitescroll','vendor-imagesloaded','vendor-parallax','vendor-boostrap','vendor-superfish','vendor-carouFredSel','vendor-isotope','vendor-appear','vendor-countTo','vendor-ProgressCircle'),DH_THEME_VERSION,true);
    wp_register_script('dh', get_template_directory_uri() . '/assets/js/script' . $suffix . '.js', array('jquery', 'vendor-easing', 'vendor-boostrap', 'vendor-superfish', 'vendor-appear'), DH_THEME_VERSION, true);
    $logo_retina = '';
    $dhL10n = array('ajax_url' => admin_url('admin-ajax.php', 'relative'), 'protocol' => dh_get_protocol(), 'breakpoint' => apply_filters('dh_js_breakpoint', 992), 'nav_breakpoint' => apply_filters('dh_nav_breakpoint', 992), 'cookie_path' => COOKIEPATH, 'screen_sm' => 768, 'screen_md' => 992, 'screen_lg' => 1200, 'touch_animate' => apply_filters('dh_js_touch_animate', true), 'logo_retina' => $logo_retina, 'ajax_finishedMsg' => esc_attr__('All posts displayed', DH_THEME_DOMAIN), 'ajax_msgText' => esc_attr__('Loading the next set of posts...', DH_THEME_DOMAIN), 'woocommerce' => defined('WOOCOMMERCE_VERSION') ? 1 : 0, 'add_to_wishlist_text' => defined('YITH_FUNCTIONS') ? apply_filters('dh_yith_wcwl_button_label', get_option('yith_wcwl_add_to_wishlist_text')) : '', 'user_logged_in' => is_user_logged_in() ? 1 : 0, 'loadingmessage' => esc_attr__('Sending info, please wait...', DH_THEME_DOMAIN));
    wp_localize_script('dh', 'dhL10n', $dhL10n);
    wp_enqueue_script('dh');
}