Hi,
Please at first let me explain my question. I use wordpress to create web sites for flash games, so I don't have certain page for post's. I add each game by
<code>
post-new.php?post_type=game
</code>
and u can see it's not the regular post for wordpress. I try to use this code from codex:
<code>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post();
$i = 0;
$loop = new WP_Query(array('post_type' => 'game', 'post_per_page' => 5 ));
while ($loop->post_type()) : $loop->game();
?>
</code>
<code>
<?php if ( in_category('') ) { ?>
<div class="post-cat-three">
<?php } else { ?>
<div class="post">
<?php } ?>
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<small><?php the_time('F jS, Y') ?> by <?php the_author_posts_link() ?></small>
<div class="entry">
<p>Category: <?php single_cat_title(); ?></p>
</div>
<p class="postmetadata">Posted in <?php the_category(', '); ?></p>
</code>
I think it really have to works for posts, but in such case I try to change post for games, try many ways, but don't sucseed yet. Could anyone tell me what I have change in this code? i think that promblem in the begining with 'have post' and 'the loop'. Thanks.