WordPress.org

Support

Support » Themes and Templates » [Resolved] Add a bio picture left of the header text?

[Resolved] Add a bio picture left of the header text?

Viewing 15 replies - 1 through 15 (of 32 total)
  • Yes.

    But it requires some coding.

    You might want to follow this advice -> How to insert image on header

    I don’t mind doing some coding, but I can’t seem to find a code that works. A broken link keeps showing up.
    I have put this in <img src=”images/cropped-bio_pic_small.jpg” />
    and I’ve tried this
    <img src=”<cropped-bio_pic_small>

    The image is in the library, so I’m not sure what I’m doing wrong.

    Also, I am putting the code before this

    <h1 class="site-title"><a>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code has now been permanently damaged by the forum’s parser.]

    Seems like the correct place because the broken image is showing up where I want the picture.

    <h1 class="site-title"><a>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>

    Do I need to be doing something in the custom-header.php and the custom css. I’ve tried so many things I am losing track of what I tried where and with what code. 🙂

    WPyogi

    @wpyogi

    Forum Moderator

    You should be using a child theme for these changes – as is, all of your changes will be lost when the theme is updated –

    http://codex.wordpress.org/Child_Themes

    I have a custom CSS, but after all the research I have found I am lost as what to change where. When I change the code in the custom css noting is happening.

    WPyogi

    @wpyogi

    Forum Moderator

    If you are modifying the header.php file, that has to be done in a child theme.

    WPyogi

    @wpyogi

    Forum Moderator

    I also would not use a 6 year old thread about another theme as a good reference. Could you post a link to your site.

    WPyogi

    @wpyogi

    Forum Moderator

    You need to use a child theme to make changes to theme files:

    http://codex.wordpress.org/Child_Themes

    I appreciate you trying to help, but I need suggestions on the code. I have no problem using a child theme, but I’m still having problems with the code and my picture showing up as a broken link. Which is also why I posted in the trouble shooting forum as well as here, as you saw.

    WPyogi

    @wpyogi

    Forum Moderator

    We don’t generally like to help people do misguided things that will create bigger problems down the road.

    That said, try uploading the image to the media library and changing the file path here to the one from that image:

    <img src="images/cropped-bio_pic_small.jpg" />

    WPyogi

    @wpyogi

    Forum Moderator

    If that doesn’t work, can you post the header.php file? Be sure to use the code buttons when posting code on these forums.

    Thank you, I will install the child theme and give that a try.

    Here is the header.php

    <?php
    /**
     * The Header for our theme.
     *
     * Displays all of the <head> section and everything up till <div id="main">
     *
     * @package willingness
     */
    ?><!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>
    	<!-- For Responsive Layout from http://www.catswhocode.com/blog/making-a-website-responsive-in-3-easy-steps -->
    	<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="HandheldFriendly" content="true">
    <!-- Responsive Ends Here -->
    
    <meta charset="<?php bloginfo( 'charset' ); ?>" />
    <meta name="viewport" content="width=device-width" />
    <title><?php wp_title( '|', true, 'right' ); ?></title>
    <link rel="profile" href="http://gmpg.org/xfn/11" />
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    <!--[if lt IE 9]>
    <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
    <![endif]-->
    
    <?php wp_head(); ?>
    </head>
    
    <body <?php body_class(); ?>>
    <div id="page" class="hfeed site">
    	<?php do_action( 'before' ); ?>
    
    	<header id="masthead" class="site-header" role="banner">
    		<div class="site-branding">
    <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
    			<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
    		</div><!--end site-branding -->
    
    		<div id="header-right" class="header-sidebar">
    				<aside id="search-box"><!--start of #search-box -->
                		<?php get_search_form(); ?>
            		</aside><!-- end of #search-box -->
    		</div><!--end of header right-->
    
    		<!-- Custom Header code from custom-header.php -->
    		<?php $header_image = get_header_image();
    	if ( ! empty( $header_image ) ) { ?>
    		<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
    			<img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" />
    		</a>
    	<?php } // if ( ! empty( $header_image ) ) ?>
    		<!-- End Custom Header from custom-header.php -->
    
    		<nav id="site-navigation" class="navigation-main" role="navigation">
    			<h1 class="menu-toggle"><?php _e( 'Menu', 'willingness' ); ?></h1>
    			<div class="screen-reader-text skip-link"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'willingness' ); ?>"><?php _e( 'Skip to content', 'willingness' ); ?></a></div>
    
    			<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
    		</nav><!-- #site-navigation -->
    	</header><!-- #masthead -->
    
    	<div id="main" class="site-main">
Viewing 15 replies - 1 through 15 (of 32 total)
  • The topic ‘[Resolved] Add a bio picture left of the header text?’ is closed to new replies.