Init commit
This commit is contained in:
47
theme/template-parts/layout/header-content.php
Normal file
47
theme/template-parts/layout/header-content.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying the header content
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package FamiliaRosaTheme
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<header id="masthead">
|
||||
|
||||
<div>
|
||||
<?php
|
||||
if ( is_front_page() ) :
|
||||
?>
|
||||
<h1><?php bloginfo( 'name' ); ?></h1>
|
||||
<?php
|
||||
else :
|
||||
?>
|
||||
<p><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
|
||||
<?php
|
||||
endif;
|
||||
|
||||
$familiarosatheme_description = get_bloginfo( 'description', 'display' );
|
||||
if ( $familiarosatheme_description || is_customize_preview() ) :
|
||||
?>
|
||||
<p><?php echo $familiarosatheme_description; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<nav id="site-navigation" aria-label="<?php esc_attr_e( 'Main Navigation', 'familiarosatheme' ); ?>">
|
||||
<button aria-controls="primary-menu" aria-expanded="false"><?php esc_html_e( 'Primary Menu', 'familiarosatheme' ); ?></button>
|
||||
|
||||
<?php
|
||||
wp_nav_menu(
|
||||
array(
|
||||
'theme_location' => 'menu-1',
|
||||
'menu_id' => 'primary-menu',
|
||||
'items_wrap' => '<ul id="%1$s" class="%2$s" aria-label="submenu">%3$s</ul>',
|
||||
)
|
||||
);
|
||||
?>
|
||||
</nav><!-- #site-navigation -->
|
||||
|
||||
</header><!-- #masthead -->
|
||||
Reference in New Issue
Block a user