© 2024 fjorge. All rights reserved.
Custom Single Page
In a recent comment, we were asked if there is a way to do the custom single page based on the custom author page. Depending on your WordPress version, this may or may not be implemented already, but either way, the solution can be found below:
global $wp_query;
$curpost = $wp_query->get_queried_object();
if(file_exists('single-'.$curpost->ID.'.php'))
{
include('single-'.$curpost->ID.'.php');
}
else
{
//Default single page
}
The basic theory is the same, get the page ID. Check if single-ID.php exists. If it does, include it. If not, do default author code.