• Hi,

    Since yesterday, the php query to find sub-pages has started not working. It’s been fine before.

    if(get_the_title($post->post_parent) != the_title(‘ ‘ , ‘ ‘,false)) { echo ‘this is a sub-page’;}

    This echoes in everywhere including parent pages.

    I’m going to disable all the plugins first, but if you have any ideas which might help, it would be greatly appreciated.

    Thanks.

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

    (@goxu)

    Strange, if I change the browser, it worked.

    Also there was a strange thing that after I clicked the Theme Editor from the Admin Panel, it redirected to a confirmation page asking if I’m going to edit the file or not. This also happned when I tried to activate activate/ disactivate plugins.

    This confirmation page has gone after I overwrote the files uinder the wp-admin directry.

    Thread Starter goxu

    (@goxu)

    OK, I found that when I disable the plugin called Edit N Place, it started working fine.

    If it is enabled, the plugin seems to cause some conflicts with the code mentioned above.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Cannot Detect if It Is in a Sub Page’ is closed to new replies.