WordPress.org

Support

Support » Themes and Templates » [Resolved] Get the ID of Top Parent Page

[Resolved] Get the ID of Top Parent Page

  • Hello,

    I am sorry if this is already asked or answered somewhere.

    Is there a way to get the ID of TOP parent page.

    Like the structure is like this :-

    Parent Page
    -Sub Page
    –Sub Sub Page
    —Sub Sub Sub Page

    now, is there a way through which I can get the ID of “Parent Page” , while I am on “Sub Sub Sub Page” and on “Sub Page”, dynamically.

    does wordpress have any API for this?

    Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Get the ID of Top Parent Page’ is closed to new replies.