Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • gxlrygt

    (@gxlrygt)

    did you try to add 'post_type' => 'page' ?

    query_posts($query_string . "&post_parent=0&post_type=page&showposts=$post_number&paged=$paged&cat=$cat");

    or

    query_posts(array( 'post_type' => 'page', 'post_parent' => 0, 'orderby' => 'menu_order', 'order' => 'DESC' ));

    gxlrygt

    (@gxlrygt)

    query_posts($query_string . "&post_parent=0&showposts=$post_number&paged=$paged&cat=$cat");

    gxlrygt

    (@gxlrygt)

    This code just displays subpages deathski

    gxlrygt

    (@gxlrygt)

    Thanks both of you man!

    This is my final code after your help:

    <?php
    $i = 0;
    $count = 3;
    global $more;
    $more = 0;
    $parent_page_id = 1092;
    query_posts(array( 'post_type' => 'page',  'post_parent' => $parent_page_id, 'orderby' => 'menu_order', 'order' => 'DESC' ));
    if (have_posts()) : ?>
    	<?php while (have_posts()) : the_post(); ?>
    	<div class="grid_4 <?php if($i % $count == 0) echo 'alpha';else if(($i+1) % $count == 0) echo 'omega';?>">
    		<?php
    		if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail())){ ?>
    		<div class="post-img">
    			<a title="<?php get_the_title(); ?>" href="<?php the_permalink(); ?>" rel="bookmark" ><?php the_post_thumbnail('service-img');?></a>
    		</div>
    		<?php } ?>
    		<h3 class="post-title"><?php the_title(); ?></h3>
    		<div class="post-content"><?php the_content('Read more &rarr;'); ?></div>
    	</div>
    	<?php
    	$i++;
    	endwhile;
    endif;
    ?>

Viewing 4 replies - 1 through 4 (of 4 total)