Theme Support Forum

Support Forum for Free and Premium Themes. Premium Theme Forums are Private! Please log in first to see the Premium forums

Viewing 2 posts - 1 through 2 (of 2 total)

I can't display custompost navigation

Home Forums Free Theme Support Zenon Lite I can't display custompost navigation

  • #113378

    Tanaka

    Hi there

    I want to display a custompost(review-pc) at top page.
    I wrote this code at layout.php.
    `<?php if ( is_home() ) { ?>
    <?php $posts = query_posts(array(‘post_type’ => ‘review-pc’,’paged’=>$paged,
    )); ?>
    <?php } ?>`

    As a a result, the custompost display top page(home), but if post-navigation button clicked, next page nothing is displayed.

    Let me know
    Thanks so much

    #113882

    Towfiq I.

    administrator

    try this:

    <?php if(is_home()) { 
    	 $args = array(
    				   'post_type' => 'review-pc',
    				   'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1),
    			);
    	query_posts($args);
    } ?>

You must be logged in to reply to this topic.