• First page should be loaded with query_page, second from the address – for instance when i type https://www.mydomain.com/?page_id=1 i’ll see both – static page and a page with id 1.

    It works when i firstly add typical loop and then with query_posts. In the reverse order it doesn’t work.

    My code:

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <h1><?php the_title(); ?></h1>
    <?php the_content(); ?>
    <?php endwhile; endif; ?>

    and here goes loop with query_posts:

    <?php query_posts('page_id=10');
    while (have_posts()) : the_post(); ?>
    <?php the_content(); ?>
    <?php endwhile; ?>

    and it works. The problem is it doesn’t in the reverse order.

  • The topic ‘Two different static pages’ is closed to new replies.