Show sub page specific parent page in wordpress

 <?php

$args = array(
    'post_type'      => 'page',
    'posts_per_page' => -1,
    'post_parent'    => 27,
    'order'          => 'ASC',
    'orderby'        => 'menu_order'
);


$parent = new WP_Query( $args );

if ( $parent->have_posts() ) : ?>

<ul>

<li> <a>All Pricing</a></li>

    <?php while ( $parent->have_posts() ) : $parent->the_post(); ?>

   

    <li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></li>

         

     

    <?php endwhile; ?>
   
    </ul>

<?php endif; wp_reset_postdata(); ?>

Comments

Popular posts from this blog

dynamic create multiple ckeditor onclick event using jquery

get lat and long from city name using jquery

membership registration and login system in php