• I am trying to get get the interstitial page. I have a plugin that fetches articles from an API. What I want is when user click on fetched article’s link it should take them to a dynamic interstitial page (which should not be stored in database) Interstitial page will fetch more content from API. Here is what I need help with:

    I want the interstitial page to look something like this “domain/post.php?id=333&code=abc”
    What can I do so when user lands on above mentioned url structure can see the data that I want them to see ?
    That interstitial page should use the css/js files from current active theme.

    Pleae guide.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    If the requested page must be post.php, there will either need to be some kind of redirect or some minor aspect of the page will need to be stored in the database. You don’t really need WP at all except to get the URL to the current theme’s stylesheet. Instead of post.php, the requested page should really be to the actual interstitial page, if not, the request needs to be redirected to it.

    Another approach that will integrate slightly better into the theme would be to create a page template that handles the API calls and the resulting display of the returned data. Then create a single page based on this template. You should provide at least a title when creating the page. No content is needed. The title could be used as a permalink to the page if you want, or you can use the page id. The title does not need to be displayed on the page at all, but it will go into the DB.

    I’m assuming the id and/or code data in your URL parameters is enough info for the page to get the correct data from the API? If not, that needs to happen somehow.

    Thread Starter hz-ar

    (@hz-ar)

    I have managed to create it by added url/%%post-url##/?id=####
    now I am having other like, how to edit title tag and other meta tags in head.

    Thanks a lot for your help so far. ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘how to add interstitial page?’ is closed to new replies.