I have a WordPress site that I’m developing locally – I am trying to create a new page with the permalink
/jobs, however when I then try and preview the page I get the following error messages in the browser:
Warning: include(): Filename cannot be empty in /Applications/XAMPP/xamppfiles/htdocs/admiral_wp/wp-content/themes/fanatic/archive.php on line 6 Warning: include(): Failed opening '' for inclusion (include_path='.:/Applications/XAMPP/xamppfiles/lib/php') in /Applications/XAMPP/xamppfiles/htdocs/admiral_wp/wp-content/themes/fanatic/archive.php on line 6
archive.php can be seen in its entirety below:
'partials/partial' ); // Use include if variables need to be passed on to partial include(locate_template('partials/partial')); </main> get_footer();get_header(); <!-- +++archive --> <main> get_template_part(
If I change the permalink to anything else (e.g.
jobss), it works fine and the page renders as expected, so the issue seems to be related specifically to the
/jobs path. I thought that perhaps it was a reserved word, but there are no custom post types registered as
jobs – although there is one called
admiral_jobs which previously had a rewrite in its args, however this has now been removed (
'rewrite' => array('slug' => 'jobs')) and I’m still getting the same error messages.
Any ideas on what else could be causing this error? Thanks
Permalinks and hit
Save Changes button may resolve your issue.