Forums

[resolved] get_the_ID(); - now how to pass it? (4 posts)

  1. arcab4
    Member
    Posted 4 years ago #

    Hello,

    so i figured out how to display the page ID on the page.

    echo get_the_ID();

    how do i get it so that page id is passed along as a variable?

    like i want the page id to = $passthepageid

    so that way if a visitor is on a page that has an id of 2, then $passthepageid would = 2.

    Thanks!

  2. Ivovic
    Member
    Posted 4 years ago #

    how about something radical like...

    $passthepageid = get_the_ID();

  3. arcab4
    Member
    Posted 4 years ago #

    oh yea. duh. heh. u rock. thanks.

  4. Ivovic
    Member
    Posted 4 years ago #

    anytime ;)

Topic Closed

This topic has been closed to new replies.

About this Topic