WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Get page ID outside of The Loop (3 posts)

  1. amistad18
    Member
    Posted 5 years ago #

    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 ;)

  2. zartgesotten
    Member
    Posted 5 years ago #

    Using the search function will help you a great deal ;-)
    Like this article in WordPress Support
    or
    This one found by google

    Hope it helps.

  3. amistad18
    Member
    Posted 5 years ago #

    Thanks for help ;)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.