• Resolved Richard K

    (@rkorebrits)


    Hi,
    Probably really simple but, I can’t get it working.

    I have a page.php (also page-home.php and page-menu.php) and the website has 4 pages now (in WP).

    To load the page data i use the loop:

    <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>

    <?php the_content(); ?>

    <?php endwhile; ?>

    But this loops the code 4 times, and thus shows the_content() of all 4 pages, in stead of the current page. What am I doing wrong?
    (i Tried googling, but not getting the right results)

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Richard K

    (@rkorebrits)

    I have just discovered that this problem does not appear on the page page.php, but only on page-home.php (i don’t use the loop in page-menu.php). page-home.php does not have any other queries in the page..

    What can this be? Has this go something to do with the URL Path? Path for the home page is https://www.domain.com/, but the other page’s do have the slug in the URL…

    Thread Starter Richard K

    (@rkorebrits)

    I have fixed the error:

    Reading settings under settings panel; at “Front page displays” I had set both the “Front page:” and the “Posts page:” to the page “Home”

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Display single page information on page’ is closed to new replies.