Open bobbingwide opened 2 years ago
On the 404 page, when a link that has been auto generated using sample_bigrams::the_content
is not found, for whatever reason, then it makes sense to implement similar logic to that implemented for search banter.
ie If the URL is for an SB bigram ( bigram\sword-bword
eg https://s.b/bigram/bigram/six-bells )
then generate a post for it. In this case the title would be Six Bells; first letters capitalized.
Is it possible to determine the referrer in order to populate the content as "Referred from Sword Bword"?
Is it possible to determine the referrer in order to populate the content as "Referred from Sword Bword"?
HTTP_REFERER may contain the URL of the referring post eg "https://s.b/bigram/bigram/shark-bloke/" but more often than not it'll be the home URL or an archive URL eg "https://s.b/bigram/s-word/shark/"
If it's the home URL we could infer the original post by running the main query run for the home page. Ditto for an archive. Or we could just run a search query and use the first post that's found.
The current page in genesis-sb is: