Creating 404 Page for Virtual Posts
-
First off, I’d like to thank you for the awesome plugin. The combination of Airtable and Airpress really opens up a ton of possibilities, especially with the Virtual Posts feature.
Our use case is effectively having users search for a report number and retreiving the information from Airtable. They search for the report number, and are redirected to domain.com/report/number where we have the report information listed. It works perfectly, except for when there is no report for the number they’ve searched in which case they receive an error:
Warning: require(): Filename cannot be empty in public/wp-content/plugins/airpress/lib/chetmac/AirpressVirtualPosts.php on line 401 Fatal error: require(): Failed opening required '' (include_path='.:/opt/sp/php7.4/lib/php') in public/wp-content/plugins/airpress/lib/chetmac/AirpressVirtualPosts.php on line 401
Is there a way to generate a 404 error for pages that follow the same URL structure (domain.com/report/xx), but don’t have a valid report number listed in Airtable?
Any help is appreciated. Thanks!
- The topic ‘Creating 404 Page for Virtual Posts’ is closed to new replies.