diff --git a/footer.php b/footer.php index bde27c0..4ce59d1 100644 --- a/footer.php +++ b/footer.php @@ -15,9 +15,10 @@ $copyright_text = getFieldValue( 'footer.copyright_text' ) ? getFieldValue( 'foo $copyright = str_replace( '%Y', gmdate( 'Y' ), $copyright_text ); -$locations = get_nav_menu_locations(); -$footerMenu = get_term( $locations['footer_navigation'], 'nav_menu' ); -$footerNav = wp_get_nav_menu_items( $footerMenu->term_id ); +$locations = get_nav_menu_locations(); +$footerNav = ! empty( $locations['footer_navigation'] ) + ? ( wp_get_nav_menu_items( (int) $locations['footer_navigation'] ) ? wp_get_nav_menu_items( (int) $locations['footer_navigation'] ) : array() ) + : array(); ?> diff --git a/views/components/menu-items/single.php b/views/components/menu-items/single.php index a08bf1c..7549302 100644 --- a/views/components/menu-items/single.php +++ b/views/components/menu-items/single.php @@ -26,7 +26,7 @@ if ( ! empty( $item->classes ) ) {