WordPress.org

Forums

Get Page Via Page Slug (4 posts)

  1. thejoker101
    Member
    Posted 9 years ago #

    I could have sworn there was a way to do this, is there? FYI, this is programming question. I would like to redirect to a page, given it's page slug. Possible?

  2. Yngwin
    Member
    Posted 9 years ago #

    Sure, but I don't get what exactly you want to do. Is this .htaccess related?

  3. thejoker101
    Member
    Posted 9 years ago #

    No, it's not. This is what I would like. I'm just checking to see if it exists, if not, I'll write the function.

    get_page_id($page-slug);

    So, given a page slug, I can get the page id.

  4. thejoker101
    Member
    Posted 9 years ago #

    Nevermind, I figured out a better way to do what I want.

    For reference, though, I think this would be a good function to have.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags