• Resolved abzu2

    (@abzu2)


    SSO plugin informs me:
    The <head> HTML tag in your header templates should include a function, action, or filter for its attributes. Change the existing <head> HTML tag to:

    <head <?php do_action( ‘add_head_attributes’ ); ?>>

    Being a HTML ignoramus, I would appreciate confirmation as to exactly where to insert the code in header.php of Elucidate (which I use as a Child). TIA

    <?php
    /**
     * The Header for our theme.
     *
     * Displays all of the <head> section and everything up till <div id="content">
     *
     * @package Elucidate
     */
    ?><!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>
    <meta charset="<?php bloginfo( 'charset' ); ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title><?php wp_title( '|', true, 'right' ); ?></title>
    <link rel="profile" href="https://gmpg.org/xfn/11">
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
    
    <?php wp_head(); ?>
    </head>
    
    <body <?php body_class(); ?>>
    <div id="page" class="hfeed site">
    	<?php do_action( 'before' ); ?>
    	<div class="screen-reader-text skip-link"><a href="#content"><?php _e( 'Skip to content', 'elucidate' ); ?></a></div>
    	<header id="masthead" class="site-header" role="banner">
    		<div class="site-branding">
    			<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
    			<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
    			
    			<?php if ( get_header_image() ) { ?>
    				<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
    					<img src="<?php header_image(); ?>" height="<?php echo get_custom_header()->height; ?>" width="<?php echo get_custom_header()->width; ?>" alt="" />
    				</a>
    			<?php } ?>
    		</div>
    
    		<nav id="site-navigation" class="main-navigation" role="navigation">
    			<button class="menu-toggle" aria-controls="menu" aria-expanded="false"><?php _e( 'Menu', '_s' ); ?></button>
    			<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
    		</nav><!-- #site-navigation -->
    	</header><!-- #masthead -->
    
    	<div id="content" class="site-content">
    

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter abzu2

    (@abzu2)

    Resolved by adding the code:

    <?php wp_head(); ?>
    <?php do_action( ‘add_head_attributes’ ); ?>
    </head>

Viewing 1 replies (of 1 total)
  • The topic ‘changing Theme Header code’ is closed to new replies.