此处显示此代码
<div class="col">
<?php gab_dynamic_sidebar(\'Subnews1\');?>
<?php
$postnr = of_get_option(\'of_wn_nr8\') + of_get_option(\'of_wn_nr8a\');
if (intval($postnr) > 0 ) { ?>
<span class="catname"><a href="<?php echo get_category_link(of_get_option(\'of_wn_cat8\'));?>"><?php echo get_cat_name(of_get_option(\'of_wn_cat8\')); ?></a></span>
<?php
$count = 1;
$args = array(
\'post__not_in\'=>$do_not_duplicate,
\'posts_per_page\' => $postnr,
\'cat\' => of_get_option(\'of_wn_cat8\', 1)
);
$gab_query = new WP_Query();$gab_query->query($args);
while ($gab_query->have_posts()) : $gab_query->the_post(); if (of_get_option(\'of_dnd\') == 1) { $do_not_duplicate[] = $post->ID; }
?>
<div class="featuredpost<?php if($count == of_get_option(\'of_wn_nr8\') or $count == $postnr) { echo \' lastpost\'; } ?>">
<?php if ($count <= of_get_option(\'of_wn_nr8\')) { ?>
<h2 class="posttitle">
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf( esc_attr__( \'Permalink to %s\', \'wpnewspaper\' ), the_title_attribute( \'echo=0\' ) ); ?>" ><?php the_title(); ?></a>
</h2>
<div class="opinion_wrapper">
<?php
gab_media(array( \'imgtag\' => 1, \'link\' => 1,
\'name\' => \'wn-subnews\',
\'enable_video\' => 0,
\'catch_image\' => of_get_option(\'of_catch_img\', 0),
\'enable_thumb\' => 1,
\'resize_type\' => \'c\',
\'media_width\' => 120,
\'media_height\' => 103,
\'thumb_align\' => \'alignleft\',
\'enable_default\' => 0
));
?>
<div class="opinion_marker"><!-- opinion marker --></div>
</div>
<p><?php echo string_limit_words(get_the_excerpt(),27); ?>…</p>
<?php gab_postmeta(); ?>
<?php } else { ?>
<a class="listtitle" href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf( esc_attr__( \'Permalink to %s\', \'wpnewspaper\' ), the_title_attribute( \'echo=0\' ) ); ?>" ><?php the_title(); ?></a>
<?php } ?>
</div><!-- .featuredpost -->
<?php $count++; endwhile; wp_reset_query(); ?>
<?php } ?>
</div><!-- .col -->
,是吗,如图所示
http://d.pr/i/7efk ,
在此网站上http://dev.dmichel.net/adv/ .
我需要做的是显示所有4个帖子,而不仅仅是1个。
我试图显示所有4篇帖子的内容是
<?php
$count = 1;
$args = array(
\'posts_per_page\' => 4,
\'cat\' => of_get_option(\'of_wn_cat8\', 1)
);
$gab_query = new WP_Query();$gab_query->query($args);
while ($gab_query->have_posts()) : $gab_query->the_post(); }
?>
但它似乎不起作用。
我想帮助显示标题上方的所有4个帖子