[resolved] display parent + child-pages (2 posts)

  1. Franz Josef Kaiser
    Posted 7 years ago #


    I want to display on a static page with my templage:

    * one parent page (id=79) and then
    * all child-pages (under page_id=79) with query_posts ...

    i can display all the child-pages, but the parent-page doesn´t appear. could you provide some help?

    Template Name: LogIn
    Description: LogIn Aussteller
    <?php get_header(); ?>
    <?php query_posts('post_type=page&page_id=79&post_parent=79&order=asc'); ?>
    <div id="page">
        <div id="slider">
            <ul class="navigation">
    <?php while (have_posts()) : the_post(); ?>
                <li><a href="#<?=$post->post_name?>"><span><?php the_title(); ?></span></a></li>
    <?php endwhile;?>
            <div class="scrollButtons scrollMeLeft"><a><span>previous</span></a></div>
            <div class="scroll">
                <div class="scrollContainer">
    <?php while (have_posts()) : the_post(); ?>
                    <div class="panel" id="<?=$post->post_name?>">
                        <h3><?php the_title(); ?></h3>
                        <?php the_content(); ?>
    <?php endwhile;?>
            <div class="scrollButtons scrollMeRight"><a><span>next</span></a></div>
    <?php get_footer(); ?>
  2. MichaelH
    Posted 7 years ago #

    I think you would need two queries to do that, one for the parent, one for the children.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.