• Ben

    (@benbornschein)


    Hello,

    the title is maybe not ideal, I try to explain what I am doing:

    I’m using a caching system (W3 Total Cache) which prevents WordPress to set $wp and $wp_query with all information about the current page. My first solution was, to use url_to_postid() to get the ID of the current page (url_to_postid($_SERVER[‘SCRIPT_URL’]);). That works for single pages but not for an archive.

    So my question is: how does WordPress gets information about the requested site, when only an URL like /my_custom_post_type/ or /my_custom_post_type/my_post/ is given?

    • This topic was modified 7 years, 6 months ago by Ben.
Viewing 1 replies (of 1 total)
  • Thread Starter Ben

    (@benbornschein)

    Does nobody knows how WordPress resolves an URL to post type and post id?

Viewing 1 replies (of 1 total)
  • The topic ‘Caching System – How does WordPress gets all information from requested URL’ is closed to new replies.