Caching System – How does WordPress gets all information from requested URL
-
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?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Caching System – How does WordPress gets all information from requested URL’ is closed to new replies.