Interrupting WP page load process
-
I hope someone can suggest a way to do the following;
I have a wordpress site that is using a theme called Debut. I need to add a page to the site that doesn’t retrieve its content from WordPress’s database but from another database. The page itself needs to be dynamic in that there will be multiple parts to the url:
https://www.mysite.com/magazines/mag_name/section1
https://www.mysite.com/magazines/mag_name/section2
etcmag_name doesn’t exist as a page in its own right and neither does the section.
What I want to do is have something that detects it is on the page (directory path) called “magazines” and then use a particular script – I believe I can write my own script to deal with the retrieval of content from another database but what I am having problems with is that WP is seeing the rest of the path in the URL and quite rightly telling me that it can’t find the page – giving me a 404 error.
I think I can stop this with by interrupting the process at the 404 page script level but is there a cleaner less hacky way to do this?
- The topic ‘Interrupting WP page load process’ is closed to new replies.