WordPress.org

Ready to get started?Download WordPress

Forums

?page_id=111 vs. ?p=111 in URL (11 posts)

  1. Han
    Member
    Posted 1 year ago #

    For some reason, after upgrading from v3.4.2 to v3.5.1, all my links that have ?p=xxxx are broken, and ?page_id=xxxx appear to work.

    Say I have a page with ID 111. What is the official URL to call that page in WordPress, disregarding permalinks? Is it ?page_id=111 or ?p=111 ?

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    What permalink structure are you using?

  3. Han
    Member
    Posted 1 year ago #

    I'm using the "day and name" permalink (e.g. http://www.mysite.com/2013/03/04/sample-post). This is used for posts. I've always had this since v3.0.

  4. esmi
    Forum Moderator
    Posted 1 year ago #

    What happens if you switch back to the default permalink structure?

  5. Han
    Member
    Posted 1 year ago #

    After changing to the "default" permalink and removing the rewrite rules from .htaccess (as recommended), the ?p does not work, and ?page_id works.

  6. esmi
    Forum Moderator
    Posted 1 year ago #

    Can we see the site using default permalinks?

  7. Han
    Member
    Posted 1 year ago #

  8. esmi
    Forum Moderator
    Posted 1 year ago #

    Where is your main posts page on the site? http://dev7.hs.iastate.edu/?p=3495 is the url for a Post - not a Page.

  9. Han
    Member
    Posted 1 year ago #

    Our site has been modified to use posts for news sorted by date, hence setting the "day and name" permalink. Our website's pages are defined in such a way when we have a page ID 111 and permalink for that page is ".../test-page", we get to ".../test-page" when we use ?p=111 (now ?page_id=111), and vice.

    It's odd that ?p=xxx used to work.

  10. Han
    Member
    Posted 1 year ago #

    So this makes me think, does ?page_id= go to a page while ?p= go to a post?

  11. esmi
    Forum Moderator
    Posted 1 year ago #

    Yes.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.