Support » Plugins » Hacks » Editing Header.php in Pictorico Theme

  • Resolved jahmin



    I’m looking for some help on editing the header.php in the Pictorico Theme so as to insert an image in site-branding.div. By default the theme inserts the site name as text. The .php is below, any suggestions on what I need to do would be most welcome!!



     * The Header for our theme.
     * Displays all of the <head> section and everything up till <div id="content">
     * @package Pictorico
    ?><!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <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="">
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
    <?php wp_head(); ?>
    <body <?php body_class(); ?>>
    <div id="page" class="hfeed site">
    	<header id="masthead" class="site-header" role="banner">
    		<div class="site-header-inner">
    			<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>
    			<nav id="site-navigation" class="main-navigation" role="navigation">
    				<h1 class="menu-toggle"><span class="screen-reader-text"><?php _e( 'Menu', 'pictorico' ); ?></span></h1>
    				<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'pictorico' ); ?></a>
    				<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
    			</nav><!-- #site-navigation -->
    			<div class="header-search">
    				<?php get_search_form(); ?>
    	</header><!-- #masthead -->
    	<?php if ( is_home() && pictorico_has_featured_posts( 1 ) ) : ?>
    		<?php get_template_part( 'content', 'featured' ); ?>
    	<?php elseif ( get_header_image() && ( is_home() || is_archive() || is_search() ) ) : ?>
    		<div class="hentry has-thumbnail">
    			<div class="entry-header">
    				<div class="header-image" style="background-image: url(<?php header_image(); ?>)">
    					<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><span class="screen-reader-text"><?php bloginfo( 'name' ); ?></span></a>
    	<?php endif; ?>
    	<div id="content" class="site-content">
Viewing 3 replies - 1 through 3 (of 3 total)
  • scratch that, i’ve sorted it.

    can you please tell what you did to sort your problem … i have the same one.

    no problem,

    this is the edited header.php file: here

    the code i changed is in line 27.

    compare that to the header.php file in your pictorico theme.

    you’ll need to make your own pictorico child theme to ensure that the change is not undone by a theme update.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Editing Header.php in Pictorico Theme’ is closed to new replies.