fix(theme): complete namespace swap + page-hero/aura-bg placement + single.spec gating
This commit is contained in:
+17
-1
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* Theme header template
|
||||
*
|
||||
* @package SoloFrameEvo
|
||||
* @package KsPortfolio
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
@@ -26,6 +26,22 @@ $showHero = in_array(
|
||||
true
|
||||
);
|
||||
|
||||
// Carbon Blue project templates render their own <h1> inside the .aura-bg
|
||||
// hero, so suppress the page-hero partial on those templates to avoid
|
||||
// duplicate <h1> elements on the page.
|
||||
$projectTemplates = array( 'front-page', 'archive-projects', 'single-projects' );
|
||||
$isProjectTemplate = in_array( get_page_template_slug( get_the_ID() ), $projectTemplates, true );
|
||||
if ( ! $isProjectTemplate ) {
|
||||
$isProjectTemplate = in_array( get_post_type(), array( 'projects' ), true ) && (
|
||||
is_front_page()
|
||||
|| is_archive( 'projects' )
|
||||
|| is_singular( 'projects' )
|
||||
);
|
||||
}
|
||||
if ( $isProjectTemplate ) {
|
||||
$showHero = false;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
Reference in New Issue
Block a user