开发者

Wordpress - Thematic Custom Post Type Loop - Child Theme

I'm new to Thematic, and I really like it,

I want to know what I'm doing wrong, I got this custom post type (CPT) called "Intranet" and in a page I want to load a custom template to run the loop with the query for showing these.

But when I try to change the loop code directly on the page templat开发者_JAVA百科e, I only got a white page.

I try it in diferent ways:

<?php $intranet = new WP_Query( array( 'paged' => get_query_var('paged'), 'post_type' => 'intranet', 'posts_per_page' => 8 ) ); ?>
<?php while ( $intranet->have_posts() ) : $intranet->the_post(); ?>

and like this

<?php global $wp_query;
query_posts("post_type=intranet");
while ( have_posts()) : the_post(); ?>

I work before with custom post types to do this, but in Thematic didn't seems to work. What's the right way to do this in Thematic??


Can you not just make a file template of e.g. page-customposttypename.php

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜