Support » Themes and Templates » Get page ID outside of The Loop

  • Resolved amistad18

    (@amistad18)


    Hi, I need to get the page ID outside the loop. I’m trying to do a submenu for a few pages in wordpress, different for each one, and I need to get the current page ID, then I will write simple function in header.php, for exacly 4 pages, something like if id=5 echo – and here a code with menu for page id 5, elseif … another id and another menu …

    I can’t use standard subpages menu in wordpress, cause most of that links will linked to the tekst on that page, or to outside pages.

    I will be pleased for help 😉

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Get page ID outside of The Loop’ is closed to new replies.