echo '<div class="content-3-col">' . "\n"; get_template_part('templates/content', get_post_format()); echo "</div> <!-- content-3-col -->\n"; $sticky_one = false; break; default: get_template_part('templates/content', get_post_format()); $sticky_one = false; } // end switch $num_cols weaverx_masonry('end-post'); } } } // end while have posts weaverx_masonry('end-posts'); echo "</div>\n"; weaverx_content_nav('nav-below'); } else { weaverx_not_found_search(__FILE__); } // every thing done, so allow comments? // comments_template( '', true ); weaverx_sb_postcontent('blog'); ?> </div><!-- #content --> <?php //$wp_query = $old_query; wp_reset_query(); wp_reset_postdata();
function weaverx_archive_loop($type) { // output loop for archive-like pages. $num_cols = weaverx_getopt('blog_cols'); $archive_cols = weaverx_getopt('archive_cols'); if (!$num_cols || $num_cols > 3) { $num_cols = 1; } if (!$archive_cols) { $num_cols = 1; } $masonry_wrap = false; // need this for one-column posts $col = 0; weaverx_post_count_clear(); echo "<div class=\"wvrx-posts\">\n"; // needed here, and all post loops to make content-n-col work with :nth-of-type while (have_posts()) { the_post(); weaverx_post_count_bump(); if ($archive_cols && !$masonry_wrap) { $masonry_wrap = true; if (weaverx_masonry('begin-posts')) { // wrap all posts $num_cols = 1; } // force to 1 cols } weaverx_masonry('begin-post'); // wrap each post switch ($num_cols) { case 1: get_template_part('templates/content', get_post_format()); break; case 2: $col++; echo '<div class="content-2-col">' . "\n"; get_template_part('templates/content', get_post_format()); echo "</div> <!-- content-2-col -->\n"; break; case 3: $col++; echo '<div class="content-3-col">' . "\n"; get_template_part('templates/content', get_post_format()); echo "</div> <!-- content-3-col -->\n"; break; default: get_template_part('templates/content', get_post_format()); } // end switch num cols weaverx_masonry('end-post'); } // end while have posts weaverx_masonry('end-posts'); echo "</div>\n"; }
$h_fontmult = 1.5; break; default: $h_fontmult = 1; break; } if (isset($GLOBALS['weaverx_sb_layout'])) { $sb_layout = $GLOBALS['weaverx_sb_layout']; } else { $sb_layout = 'none'; } $local = array('hideTip' => weaverx_getopt('hide_tooltip') ? '1' : '0', 'hFontFamily' => $content_h_ff, 'hFontMult' => $h_fontmult, 'sbLayout' => $sb_layout, 'flowColor' => weaverx_getopt('flow_color') ? '1' : '0', 'full_browser_height' => weaverx_getopt('full_browser_height') || weaverx_is_checked_page_opt('_pp_full_browser_height') ? '1' : '0', 'primary' => weaverx_getopt('primary_eq_widgets') ? '1' : '0', 'secondary' => weaverx_getopt('secondary_eq_widgets') ? '1' : '0', 'top' => weaverx_getopt('top_eq_widgets') ? '1' : '0', 'bottom' => weaverx_getopt('bottom_eq_widgets') ? '1' : '0', 'header_sb' => weaverx_getopt('header_sb_eq_widgets') ? '1' : '0', 'footer_sb' => weaverx_getopt('footer_sb_eq_widgets') ? '1' : '0'); wp_localize_script('weaverxJSLibEnd', 'wvrxEndOpts', $local); // in footer.php because don't know the values yet in functions.php wp_footer(); weaverx_masonry('invoke-code'); if (WEAVERX_DEV_MODE) { $end_time = microtime(true); weaverx_debug_comment('Page generated in: ' . round($end_time - $GLOBALS['wvrx_timer'], 3) . ' seconds.'); } ?> <script> function bigImg(x) { x.style.height = "219px"; x.style.width = "300px"; } function normalImg(x) { x.style.height = "150px"; x.style.width = "200px"; }
function weaverx_render_infinite_scroll() { $GLOBALS['weaverx_page_who'] = 'blog'; $num_cols = weaverx_getopt('blog_cols'); if (!$num_cols || $num_cols > 3) { $num_cols = 1; } $col = 0; $masonry_wrap = false; // need this for one-column posts /* Start the Loop */ weaverx_post_count_clear(); echo "<div class=\"wvrx-posts\">\n"; while (have_posts()) { the_post(); weaverx_post_count_bump(); if (!$masonry_wrap) { $masonry_wrap = true; if (weaverx_masonry('begin-posts')) { // wrap all posts $num_cols = 1; } // force to 1 cols } weaverx_masonry('begin-post'); // wrap each post switch ($num_cols) { case 1: get_template_part('templates/content', get_post_format()); $sticky_one = false; break; case 2: $col++; echo '<div class="content-2-col clearfix">' . "\n"; get_template_part('templates/content', get_post_format()); echo "</div> <!-- content-2-col -->\n"; $sticky_one = false; break; case 3: $col++; echo '<div class="content-3-col clearfix">' . "\n"; get_template_part('templates/content', get_post_format()); echo "</div> <!-- content-3-col -->\n"; $sticky_one = false; break; default: get_template_part('templates/content', get_post_format()); $sticky_one = false; } // end switch num cols weaverx_masonry('end-post'); } // end while have posts weaverx_masonry('end-posts'); echo "</div>\n"; }