diff --git a/archive-projects.php b/archive-projects.php index a3a0928..1c67a66 100644 --- a/archive-projects.php +++ b/archive-projects.php @@ -15,6 +15,7 @@ if ( ! $hero_intro ) { } ?>
+
@@ -54,5 +55,4 @@ if ( ! $hero_intro ) {
+
@@ -80,5 +81,4 @@ $hero_cta_2 = get_field( 'homepage_hero_cta_2' );
inside the .aura-bg +// hero, so suppress the page-hero partial on those templates to avoid +// duplicate

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; +} + ?> diff --git a/lib/class-acf.php b/lib/class-acf.php index ae9764b..79ef8f0 100644 --- a/lib/class-acf.php +++ b/lib/class-acf.php @@ -2,7 +2,7 @@ /** * ACF (Advanced Custom Fields) support class & functions * - * @package SoloFrameEvo + * @package KsPortfolio * @since 1.0.0 */ diff --git a/lib/class-enqueue.php b/lib/class-enqueue.php index 9a0b8cf..bc378ad 100644 --- a/lib/class-enqueue.php +++ b/lib/class-enqueue.php @@ -1,8 +1,8 @@ diff --git a/sidebar.php b/sidebar.php index 8344614..2caf19a 100644 --- a/sidebar.php +++ b/sidebar.php @@ -2,10 +2,10 @@ /** * Sidebar * - * @package SoloFrameEvo + * @package KsPortfolio */ -namespace SoloFrameEvo; +namespace KsPortfolio; ?> diff --git a/single-projects.php b/single-projects.php index 8013e7b..78178f8 100644 --- a/single-projects.php +++ b/single-projects.php @@ -28,6 +28,7 @@ while ( have_posts() ) : $excerpt = has_excerpt( $project_id ) ? get_the_excerpt( $project_id ) : ''; ?>
+
@@ -164,5 +165,4 @@ while ( have_posts() ) : name : __( 'Projects', 'ks-portfolio' ); ?>
+
@@ -56,5 +57,4 @@ $term_name = $queried && ! is_wp_error( $queried ) ? $queried->name : __( 'Proje
{ test('project detail renders hero, sidebar, no axe violations', async ({ page }, testInfo) => { - // Pick the first project; skip the test gracefully if none exist. + // Navigate to the projects archive and pick the first card. The test + // fails (not skips) when no projects exist — silently skipping masks + // regression of the single-project template itself. const response = await page.goto('/projects/'); expect(response && response.status()).toBeLessThan(400); const firstLink = page.locator('.archive-projects__grid a.project-card__title-link').first(); - if (await firstLink.count() === 0) { - test.skip(true, 'No projects to test detail page'); - return; - } + const linkCount = await firstLink.count(); + expect(linkCount, 'archive must contain at least one project card to exercise the single-project template').toBeGreaterThan(0); await Promise.all([ page.waitForLoadState('networkidle'), diff --git a/views/blocks/accordion/accordion.php b/views/blocks/accordion/accordion.php index 84856df..5eb0dea 100644 --- a/views/blocks/accordion/accordion.php +++ b/views/blocks/accordion/accordion.php @@ -4,10 +4,10 @@ * * This is the template that renders the Accordion block. * - * @package SoloFrameEvo + * @package KsPortfolio */ -namespace SoloFrameEvo; +namespace KsPortfolio; $open = get_field( 'open' ); $group = get_field( 'group_items' ); diff --git a/views/blocks/boilerplate/boilerplate.php b/views/blocks/boilerplate/boilerplate.php index 3b46509..448d95a 100644 --- a/views/blocks/boilerplate/boilerplate.php +++ b/views/blocks/boilerplate/boilerplate.php @@ -4,10 +4,10 @@ * * This is the template for building your own custom blocks. * - * @package SoloFrameEvo + * @package KsPortfolio */ -namespace SoloFrameEvo; +namespace KsPortfolio; $classes = 'boilerplate'; diff --git a/views/blocks/button/button.php b/views/blocks/button/button.php index bd8c353..f53a312 100644 --- a/views/blocks/button/button.php +++ b/views/blocks/button/button.php @@ -2,10 +2,10 @@ /** * Button block * - * @package SoloFrameEvo + * @package KsPortfolio */ -namespace SoloFrameEvo; +namespace KsPortfolio; // Retrieve ACF fields $element = get_field( 'element' ) ? get_field( 'element' ) : 'a'; diff --git a/views/blocks/buttons/buttons.php b/views/blocks/buttons/buttons.php index 9519e9e..c4f085b 100644 --- a/views/blocks/buttons/buttons.php +++ b/views/blocks/buttons/buttons.php @@ -4,10 +4,10 @@ * * This is the template that renders the Buttons block. * - * @package SoloFrameEvo + * @package KsPortfolio */ -namespace SoloFrameEvo; +namespace KsPortfolio; $ibClasses = 'flex flex-wrap gap-4 w-full justify-center sm:justify-start'; diff --git a/views/blocks/contact-info/contact-info.php b/views/blocks/contact-info/contact-info.php index cb945ee..42470ca 100644 --- a/views/blocks/contact-info/contact-info.php +++ b/views/blocks/contact-info/contact-info.php @@ -4,10 +4,10 @@ * * Display contact information from global fields with icons and optional form. * - * @package SoloFrameEvo + * @package KsPortfolio */ -namespace SoloFrameEvo; +namespace KsPortfolio; $classes = 'contact-info'; $wrapper = blockWrapperAttributes( $classes, $is_preview ); diff --git a/views/blocks/grid-cell/grid-cell.php b/views/blocks/grid-cell/grid-cell.php index d88d303..ddf8246 100644 --- a/views/blocks/grid-cell/grid-cell.php +++ b/views/blocks/grid-cell/grid-cell.php @@ -4,10 +4,10 @@ * * This is the template that displays the Grid Cell block. * - * @package SoloFrameEvo + * @package KsPortfolio */ -namespace SoloFrameEvo; +namespace KsPortfolio; // Initialize variables $className = ! empty( $block['className'] ) ? $block['className'] : ''; diff --git a/views/blocks/grid/grid.php b/views/blocks/grid/grid.php index a81ed1c..764cdca 100644 --- a/views/blocks/grid/grid.php +++ b/views/blocks/grid/grid.php @@ -4,10 +4,10 @@ * * This is the template that displays the grid block. * - * @package SoloFrameEvo + * @package KsPortfolio */ -namespace SoloFrameEvo; +namespace KsPortfolio; $allowedBlocks = array( 'acf/grid-cell' ); $default_blocks = array( diff --git a/views/blocks/homepage-hero/homepage-hero.php b/views/blocks/homepage-hero/homepage-hero.php index 0594ec6..fc59ecb 100644 --- a/views/blocks/homepage-hero/homepage-hero.php +++ b/views/blocks/homepage-hero/homepage-hero.php @@ -2,10 +2,10 @@ /** * Block Name: Homepage Hero * - * @package SoloFrameEvo + * @package KsPortfolio */ -namespace SoloFrameEvo; +namespace KsPortfolio; // Retrieve ACF fields $heading = get_field( 'heading' ); diff --git a/views/blocks/media-text-innerblocks/media-text-innerblocks.php b/views/blocks/media-text-innerblocks/media-text-innerblocks.php index d9daf5c..c3ee9d4 100644 --- a/views/blocks/media-text-innerblocks/media-text-innerblocks.php +++ b/views/blocks/media-text-innerblocks/media-text-innerblocks.php @@ -4,10 +4,10 @@ * * This is the template that displays the media text inner blocks. * - * @package SoloFrameEvo + * @package KsPortfolio */ -namespace SoloFrameEvo; +namespace KsPortfolio; // Retrieve ACF fields $bgColor = get_field( 'background_color' ) ? get_field( 'background_color' ) : '#c5c5c5'; diff --git a/views/blocks/media-text/media-text.php b/views/blocks/media-text/media-text.php index 01b9cde..f4abe0e 100644 --- a/views/blocks/media-text/media-text.php +++ b/views/blocks/media-text/media-text.php @@ -4,10 +4,10 @@ * * This is the template that displays the Media With Text block. * - * @package SoloFrameEvo + * @package KsPortfolio */ -namespace SoloFrameEvo; +namespace KsPortfolio; // Retrieve ACF fields $bgColor = get_field( 'background_color' ) ? get_field( 'background_color' ) : '#c5c5c5'; diff --git a/views/blocks/page-children/page-children.php b/views/blocks/page-children/page-children.php index 2e06825..49d5f3b 100644 --- a/views/blocks/page-children/page-children.php +++ b/views/blocks/page-children/page-children.php @@ -2,10 +2,10 @@ /** * Page Children block * - * @package SoloFrameEvo + * @package KsPortfolio */ -namespace SoloFrameEvo; +namespace KsPortfolio; // Retrieve the current page ID and its children $parentId = get_queried_object_id(); diff --git a/views/blocks/section/section.php b/views/blocks/section/section.php index 30d17bb..a40ca8f 100644 --- a/views/blocks/section/section.php +++ b/views/blocks/section/section.php @@ -4,10 +4,10 @@ * * This is the template that displays the section block. * - * @package SoloFrameEvo + * @package KsPortfolio */ -namespace SoloFrameEvo; +namespace KsPortfolio; // Retrieve ACF fields $contentWidth = get_field( 'content_width' ); diff --git a/views/components/menu-items/has-children.php b/views/components/menu-items/has-children.php index 4f95f9e..a727a07 100644 --- a/views/components/menu-items/has-children.php +++ b/views/components/menu-items/has-children.php @@ -6,7 +6,7 @@ * https://docs.vincentdevelopment.ca/docs/starter-v3-enhancements/navigation/ */ -namespace SoloFrameEvo; +namespace KsPortfolio; // Variables available: // $item from parent template diff --git a/views/components/menu-items/index.php b/views/components/menu-items/index.php index 2f244e7..6a97599 100644 --- a/views/components/menu-items/index.php +++ b/views/components/menu-items/index.php @@ -6,7 +6,7 @@ * https://docs.vincentdevelopment.ca/docs/starter-v3-enhancements/navigation/ */ -namespace SoloFrameEvo; +namespace KsPortfolio; // Variables available from MenuItems component: // $topLevelNavItems, $hasChildren, $nestedNavItems, $currentPage, $location diff --git a/views/components/menu-items/single.php b/views/components/menu-items/single.php index 3126518..ac12f54 100644 --- a/views/components/menu-items/single.php +++ b/views/components/menu-items/single.php @@ -6,7 +6,7 @@ * https://docs.vincentdevelopment.ca/docs/starter-v3-enhancements/navigation/ */ -namespace SoloFrameEvo; +namespace KsPortfolio; // Variables available: // $item from parent template diff --git a/views/components/nav-main.php b/views/components/nav-main.php index 214369d..a3c4287 100644 --- a/views/components/nav-main.php +++ b/views/components/nav-main.php @@ -6,7 +6,7 @@ * https://docs.vincentdevelopment.ca/docs/starter-v3-enhancements/navigation/ */ -namespace SoloFrameEvo; +namespace KsPortfolio; global $views; ?> diff --git a/views/components/nav-main__toggle.php b/views/components/nav-main__toggle.php index 51aafd9..209dc41 100644 --- a/views/components/nav-main__toggle.php +++ b/views/components/nav-main__toggle.php @@ -6,7 +6,7 @@ * https://docs.vincentdevelopment.ca/docs/starter-v3-enhancements/navigation/ */ -namespace SoloFrameEvo; +namespace KsPortfolio; // Init Variables $navIcon = isset( get_field( 'header', 'option' )['nav_icon'] ) ? get_field( 'header', 'option' )['nav_icon'] : ''; diff --git a/views/forms/search.php b/views/forms/search.php index 3aed4b5..9696a0c 100644 --- a/views/forms/search.php +++ b/views/forms/search.php @@ -14,7 +14,7 @@ namespace KsPortfolio;