WordPress.org

Ready to get started?Download WordPress

Forums

Get the page name or ID from the full URI (2 posts)

  1. David Gard
    Member
    Posted 2 years ago #

    Hey all,

    I'm trying to redirect after a front end user login, but only if the user is on a certain page. Using the login_redirect filter I can get the full URI of the page that I am being redirected to (the page that the user logged on from), but from that is there any way of getting the page name or ID so that I can return a different login redirect if needs be?

    Thanks.

  2. vjpo
    Member
    Posted 2 years ago #

    $post->ID for current page/post ID
    get_the_title() for a title

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.