• Hi
    I’d like to add a paragraph of text to my header.php, below the site title and description.
    What is the best way to do this? Hard-coding in HTML?
    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Probably.

    Look for this in the header.php

    // Add the blog description for the home/front page.
    	$site_description = get_bloginfo( 'description', 'display' );
    	if ( $site_description && ( is_home() || is_front_page() ) )
    		echo " | $site_description";

    and underneath it put something like

    ?> (to switch to html)
    <p id="header-text"> Any text you like </p>
    
    <?php (to go back to php)

    Then you can style the new paragraph however you like using #header-text in your css

    Sorry ignore what I just said. I’ve got my idiot head on today

    Do this instead

    find
    <div id="site-description"><?php bloginfo( 'description' ); ?></div>

    and add underneath something like

    <p id="header-text">Any text you like</p>

    Then you can style the new paragraph however you like using #header-text in your css

    Thread Starter wambamboo

    (@agatha1)

    Great, thanks! Lucky the client won’t need to change it.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Add paragraph to header’ is closed to new replies.