修改代码以使用正确的query\\u posts调用。使用
query_posts(\'post_type=portfolio&offset=\' . $offset);
而不是
query_posts(\'offset=\' . $offset);
下面是您修改的代码:
<?php
/*
Template Name: 2 Column Blog Template
*/
get_header();
?>
<section class="container">
<!-- 960 Container -->
<?php
$counter = 1; //start counter
$grids = 2; //Grids per row
global $query_string; //Need this to make pagination work
$paged = get_query_var(\'paged\');
$offset = 0;
if ($paged != 0 ) {
$offset = ($paged-1) * get_query_var(\'posts_per_page\') ;
}
query_posts(\'offset=\' . $offset);
if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php
global $more;
$more = 0;
...
query\\u posts的完整codex手册是
here