<i class="icon-search"></i> </button> <a class="small-logo hidden-desktop" rel="home" title="DW Focus" href="<?php echo esc_url(home_url('/')); ?> ">DW Focus</a> <?php // Social links $facebook = dw_get_option('dw_facebook'); $twitter = dw_get_option('dw_twitter'); $gplus = dw_get_option('dw_gplus'); $linkedin = dw_get_option('dw_linkedin'); $feedlink = dw_get_option('dw_feedlink', true); $loginlink = dw_get_option('dw_loginlink', true); ?> <ul class="social-links visible-desktop"> <?php if ($facebook) { ?> <li class="facebook"><a target="_blank" href="<?php echo $facebook; ?> " title="<?php _e('Facebook', 'dw-focus'); ?> "><i class="icon-facebook"></i></a></li> <?php } ?>
/** * Get latest news of today or numbers of recent posts for megamenu if dont have any post on today */ function dw_top15() { $display_type = dw_get_option('dw_menu_display_type'); if (!$display_type) { $display_type = 'today'; } $max_number_posts = dw_get_option('dw_menu_number_posts'); if (!$max_number_posts) { $max_number_posts = 15; } $post_array = array('posts_per_page' => $max_number_posts, 'order' => 'DESC', 'post_status' => 'publish', 'ignore_sticky_posts' => 1); $is_news_today = false; if ($display_type == 'today') { $is_news_today = true; add_filter('posts_where', 'dw_top15_filter_where'); $r = new WP_Query($post_array); remove_filter('posts_where', 'dw_top15_filter_where'); if ($r->post_count <= 0) { $is_news_today = false; $r = new WP_Query($post_array); } } else { $r = new WP_Query($post_array); } ?> <a class="dropdown-toggle" data-toggle="dropdown" href="#"> <span class="number"><?php echo $r->post_count; ?> </span> <span><?php echo $display_type == 'today' && $is_news_today ? __('New Articles today', 'dw_focus') : __('Must read articles', 'dw_focus'); ?> <i class="icon-caret-down"></i></span> </a> <?php if ($r->have_posts()) { $i = 0; ?> <div class="top-news-inner"> <ul class="dropdown-menu"> <div class="entry-meta"><?php echo date(get_option('date_format')); ?> </div> <div class="row-fluid"> <ul> <?php while ($r->have_posts()) { $r->the_post(); $class = ''; if (has_post_thumbnail()) { $class .= 'has-thumbnail'; } if ($i % 3 == 0) { $class .= ' first'; } ?> <li class="<?php echo $class; ?> "> <div class="topnews-thumbnail"><a href="<?php the_permalink(); ?> " title="<?php the_title(); ?> "><?php the_post_thumbnail(array(40, 40)); ?> </a></div> <div class="topnews-title"><a href="<?php the_permalink(); ?> " title="<?php the_title(); ?> "> <?php the_title(); ?> </a></div> </li> <?php $i++; } ?> </ul> </div> </ul> </div> <?php wp_reset_postdata(); } }
<div class="post-layout"> <a class="layout-list <?php dw_active(apply_filters('cat_display_filter', dw_get_option('cat_display')), 'list'); ?> " href="#"><i class="icon-th-list"></i></a> <a class="layout-grid <?php dw_active(apply_filters('cat_display_filter', dw_get_option('cat_display')), 'grid'); ?> " href="#"><i class="icon-th"></i></a> </div> <?php } ?> </div> <div class="content-inner <?php echo 'layout-' . apply_filters('cat_display_filter', dw_get_option('cat_display')); ?> "> <?php if (have_posts()) { ?> <?php global $archive_i; $archive_i = 1; ?> <?php while (have_posts()) { the_post(); ?> <?php get_template_part('content', 'archive');
function nex_setting_field_footer_script() { ?> <textarea name="option_tree[dw_footer_script]" id="dw-focus-option-footer-script" cols="50" rows="10" class="large-text code"><?php echo dw_get_option('dw_footer_script', false, true); ?> </textarea> <p class="description"><?php _e('The wp_footer() hook executes immediately before the closing </body> tag in the document source.', 'dw_focus'); ?> </p> <?php }
if ($blogs->have_posts()) { ?> <?php while ($blogs->have_posts()) { $blogs->the_post(); ?> <?php get_template_part('content', get_post_format()); ?> <?php } ?> <?php } else { ?> <?php get_template_part('no-results', 'archive'); ?> <?php } ?> </div> <?php dw_focus_pagenavi($blogs, dw_get_option('dw_blog_navigation', 'number')); ?> </div> <?php get_sidebar('blog'); get_footer();