fix: read navigation from WordPress menus

The header and footer had five URLs hardcoded from the local fixtures.
On a site whose pages are named differently, that is five 404s in the
navigation, which is exactly what happened on chrnx.dev.

Both now read an assigned menu and fall back to the built-in pages when
no menu is set or the assigned one is empty.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
chrnxandClaude Opus 5 committed 2026-08-13 19:42:07 -05:00
1 parent 6c7ed22970
commit df117e67bb
2 files changed
+15 -25

No files matched your search

+1 -22
View File
@@ -5,28 +5,7 @@
* @package CHRNX
*/
$chrnx_footer_links = array(
array(
'label' => __( 'Journal', 'chrnx' ),
'url' => home_url( '/journal/' ),
),
array(
'label' => __( 'Projects', 'chrnx' ),
'url' => home_url( '/projects/' ),
),
array(
'label' => __( 'Music', 'chrnx' ),
'url' => home_url( '/music/' ),
),
array(
'label' => __( 'Podcasts', 'chrnx' ),
'url' => home_url( '/podcasts/' ),
),
array(
'label' => __( 'About', 'chrnx' ),
'url' => home_url( '/about/' ),
),
);
$chrnx_footer_links = chrnx_get_navigation_links( 'chrnx-footer' );
$chrnx_site_name = get_bloginfo( 'name' );
$chrnx_current_url = chrnx_get_current_navigation_destination();
$chrnx_copyright = sprintf(