• I’m making a website for a company, that rents holiday apartments and on the side offers some additional services, and I’d like to use WordPress as CMS. The global navigation for the site will look something like this:
    Home | Apartments | Services | Contact

    The way I now have the site set up on my localhost, is that I’ve created a Page for each of the navigation items, but I’ve also created corresponding categories for Apartments and Services, and created posts for each apartment/service.

    Inside page.php I’m using an if condition per page and then creating a query for each category:

    <?php if(is_page('apartments')) {  ?>
    <?php $apartments_query = new WP_Query('category_name=Apartments'); ?>
    <?php while ($apartments_query->have_posts()) : $apartments_query->the_post(); ?>

    etc.

    Does my way of doing this make any sense? Would you do it differently and how? I’m using Flutter to create custom write panels. Not sure if that makes any difference…

    I’m planning on using the Google XML Sitemaps plugin. Could my current approach have any negative side effects relating to the sitemaps?

  • The topic ‘About using pages to display posts’ is closed to new replies.