Support » Fixing WordPress » Child pages loading parent data, not its own

Viewing 8 replies - 1 through 8 (of 8 total)
  • Try resetting your custom permalinks to the default setting and see if that works first.

    esmi, I have no problems pulling up the pages via their IDs. The permalinks used are the defaults available out of the box.

    Then it’ll most likely be a problem with the template file that handles the display for those pages, which you can easily confirm by switching to another theme and checking the page(s).

    @t31os_ I gave your idea a try and it seems to be creating the same problem for me. It’s starting to look like more a config issue than a template issue.

    Three months later and I am still running into the problem. This is the rewrite rule as we speak:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    # END WordPress

    Probably a custom query screwing with the data..

    If you have a page template attached to this problematic page
    1. Open the page template file.
    If you don’t have a page template attached
    1. Open your theme’s page.php

    2. Find a line that starts like this.


    or alternatively (only if above not found)

    while( have_posts() ) : the_post();

    3. Add this code before the above code.


    4. Appropriate code should now look like this.

    query_posts( ..etc..


    while( have_posts() ) : the_post();

    5. Try your page.

    Failing that, i’ll need to see the template file responsible for displaying those page, if necessary, please post code into a pastebin.
    Here’s the code. I gave your suggestion a try and it doesn’t appear to be make much of a difference.

    The one thing that is being overlooked, however is that switching templates doesn’t appear to solve the problem. I switched to the WordPress Default theme and it didn’t make any difference.

    Then the query could be getting modified by a filter / action from a plugin, disable your plugins and see if the problem goes away.

    Failing that, i’d ask if you have any custom queries in the header (not that it should matter, you have a reset in your file already).

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Child pages loading parent data, not its own’ is closed to new replies.