stephensaid
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Hi Kuba,
Thanks for coming back.
I am changing the password from WooCommerce Dashboard.
StephenForum: Plugins
In reply to: [Smart Slider 3] Blur in Microsoft EdgeHi bcworkz,
Thanks for your suggestions. I am not sure how to do it using sql so went with your other suggestion and this is what I’ve got. – and it works.
<?php global $post; $ourCurrentPage = get_query_var('paged'); $thispost = $post->ID; $allmypages = new WP_Query(array( 'post_type' => 'page', 'post_parent' => $post->ID, 'showposts' => -1 )); $i = 0; if ($allmypages->have_posts()) : while ($allmypages->have_posts()) : $allmypages->the_post(); $children = get_pages( array( 'child_of' => $post->ID ) ); $count_of_children = count( $children ); /* echo $post->ID; ?> - <?php echo the_title(); ?> - <?php echo $count_of_children . '<br>'; */ if( $count_of_children > 0 ) { $pageswithchildren[++$i] = $post->ID; } endwhile; endif; $mypages = new WP_Query(array( 'post_type' => 'page', 'post_parent' => $thispost, 'showposts' => 10, 'post__not_in' => $pageswithchildren, 'paged' => $ourCurrentPage, 'order' => desc, 'orderby' => ID )); ?> <div class="bdl-pagination woocommerce-pagination"> <?php echo paginate_links(array('total' => $mypages->max_num_pages)); ?> </div> <?php if ($mypages->have_posts()) : while ($mypages->have_posts()) : $mypages->the_post(); ?> <div class="bdl-child-pages"> <h2><?php the_title(); ?></h2> <div class="entry page-<?php echo the_ID(); ?>"><?php echo the_content(); ?></div> <div class="bdl-read-more"><a class="button" href="<?php the_permalink(); ?>">Read more...</a></div> </div> <?php endwhile; ?> <div class="bdl-pagination woocommerce-pagination"> <?php echo paginate_links(array('total' => $mypages->max_num_pages)); ?> </div> <?php endif; wp_reset_postdata(); ?>
Viewing 3 replies - 1 through 3 (of 3 total)