• Hi,

    I would like to have all my pages appear on the static frontpage. How can I do this please?

    I know I could use posts, but I have a few pages on a site already and would like to use them as posts. Is there a snippet of code to paste in one of the .php templates, or a setting I can use to make this happen?

    Thanks a lot!

Viewing 1 replies (of 1 total)
  • Hello

    You can use following code snippet

    <?php $posts= query_posts('post_type=page&post_id=325&posts_per_page=1');
    //print_r($posts);
    if ( have_posts() ): ?>
    <?php while( have_posts() ): the_post();
    get_template_part( 'template-parts/content', get_post_format() );
    endwhile;
    ?>
    <?php endif;
    wp_reset_query(); ?>
Viewing 1 replies (of 1 total)
  • The topic ‘I would like to have all pages on the static homepage’ is closed to new replies.