Query a WordPress page by its title which has a parent page
-
Hi there,
Im trying to query a page by its title.
So far i have the following:
<?php query_posts('pagename=features'); if (have_posts()) : while (have_posts()) : the_post();?> <h2><?php the_title(); ?></h2> <?php the_content(); ?> <?php endwhile; ?> <?php else : ?> <h3 class="center">No Section available</h3> <p class="center"><?php _e("No Section available"); ?></p> <?php endif; //Reset Query wp_reset_query(); ?>
[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
The main issue here, is it have 7 pages called features, which are under different parent pages.
How do i target a child page title?
Thank you
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Query a WordPress page by its title which has a parent page’ is closed to new replies.