if (get_query_var('paged')) { $paged = get_query_var('paged'); } if (get_query_var('page')) { $paged = get_query_var('page'); } $paged = intval($paged); $query_args = array('post_type' => 'post', 'paged' => $paged); $query_args = apply_filters('woo_blog_template_query_args', $query_args); // Do not remove. Used to exclude categories from displaying here. remove_filter('pre_get_posts', 'woo_exclude_categories_homepage', 10); query_posts($query_args); if (have_posts()) { $count = 0; ?> <div class="fix"></div> <?php while (have_posts()) { the_post(); $count++; woo_get_template_part('content', get_post_type()); } // End WHILE Loop } else { get_template_part('content', 'noposts'); } // End IF Statement woo_loop_after(); woo_pagenav();
<?php /** * Page Template * */ get_header(); ?> <div class="container"> <div id="main-entry"> <?php if (have_posts()) { $count = 0; while (have_posts()) { the_post(); $count++; woo_get_template_part('content', 'page'); } } ?> </div> </div> <?php get_footer();
echo '<div class="entry-content greySections addLiteMarginTop">'; echo '<div class="whiteCard">'; echo '<h3 class="blueHeaders">' . get_the_title($ID) . '</h3>'; the_content(); echo '</div>'; echo '</div>'; } } else { // no posts found } if (have_posts()) { $count = 0; while (have_posts()) { the_post(); $count++; woo_get_template_part('content', 'page-template-business'); // Get the page content template file, contextually. } } woo_loop_after(); ?> </section><!-- /#main --> <?php woo_main_after(); ?> <?php
<!-- #content Starts --> <?php woo_content_before(); ?> <div id="content" class="col-full"> <div id="main-sidebar-container"> <!-- #main Starts --> <?php woo_main_before(); ?> <div id="main" class="col-left"> <?php woo_loop_before(); woo_get_template_part('content', '404'); // Get the 404 content template file, contextually. woo_loop_after(); ?> </div><!-- /#main --> <?php woo_main_after(); ?> <?php get_sidebar(); ?> </div><!-- /#main-sidebar-container --> <?php
function woo_portfolio_page_content() { if (!is_page_template('template-portfolio.php')) { return; } // Show page content first if (have_posts()) { the_post(); woo_get_template_part('content', 'page-template-business'); // Use business content so we don't output a page title } }
if ($count <= $woo_options['woo_magazine_feat_posts'] && !is_paged()) { woo_get_template_part('content', 'magazine-featured'); continue; } $column_count_1++; $column_count_2++; ?> <div class="block<?php if ($column_count_1 > 1) { echo ' last'; $column_count_1 = 0; } ?> "> <?php woo_get_template_part('content', 'magazine-grid'); ?> </div><!--/.block--> <?php if ($column_count_1 == 0) { ?> <div class="fix"></div><?php } // End IF Statement } // End WHILE Loop } else { get_template_part('content', 'noposts'); } // End IF Statement woo_loop_after();
global $more; $more = 0; // Get taxonomy query object $taxonomy_archive_query_obj = $wp_query->get_queried_object(); // Taxonomy term name $taxonomy_term_nice_name = $taxonomy_archive_query_obj->name; // Taxonomy term slug $taxonomy_term_slug = $taxonomy_archive_query_obj->slug; woo_loop_before(); if (have_posts()) { $count = 0; $title_before = '<span class="archive_header">'; $title_after = '</span>'; woo_archive_title($title_before, $title_after); ?> <div class="fix"></div> <?php while (have_posts()) { the_post(); $count++; woo_get_template_part('content', 'tumblog'); } // End WHILE Loop } else { get_template_part('content', 'noposts'); } // End IF Statement woo_loop_after(); woo_pagenav();
woo_loop_before(); if (have_posts()) { $count = 0; $title_before = '<h1 class="archive_header">'; $title_after = '</h1>'; echo $title_before . sprintf(__('Search results for "%s"', 'woothemes'), get_search_query()) . $title_after; ?> <div class="fix"></div> <?php if (function_exists('relevanssi_didyoumean')) { relevanssi_didyoumean(get_search_query(), "<p>Did you mean: ", "</p><br>", 5); } while (have_posts()) { the_post(); $count++; if (get_option('woo_woo_tumblog_switch') == 'true') { $is_tumblog = woo_tumblog_test(); } else { $is_tumblog = false; } woo_get_template_part('content', 'search'); } // End WHILE Loop } else { get_template_part('content', 'noposts'); } // End IF Statement woo_loop_after(); woo_pagenav();
/** * Load the desired component, if a method is available for it. * @param string $component The component to potentially be loaded. * @since 5.0.8 * @return void */ protected function load_component($component) { switch ($component) { case 'blog': get_template_part('loop', 'blog'); break; case 'business-slider': echo '<div class="business">' . "\n"; woo_slider_biz(); echo '</div>' . "\n"; break; case 'magazine-slider': echo '<div class="magazine">' . "\n"; woo_slider_magazine(); echo '</div>' . "\n"; break; case 'magazine-grid': echo '<div class="magazine">' . "\n"; get_template_part('loop', 'magazine'); echo '</div>' . "\n"; break; case 'current-page-content': if (have_posts()) { $count = 0; while (have_posts()) { the_post(); $count++; woo_get_template_part('content', 'page'); // Get the page content template file, contextually. } } break; default: break; } }