How to add an image in the header in WordPress

Link: http://new.shiva-rahbaran.org/wordpress/

I would like to have a profile pic in the upper left part. I’m using the twentytwelve WordPress theme.

Read More

The Result should be something like this:
http://shiva-rahbaran.org/

So, it can also be above the right side menu. Where and how to integrate in the WordPress back-end with, my theme?

Best,
Amir

Related posts

Leave a Reply

2 comments

  1. I would recommend adding it as a widget since you probably aren’t using a child theme (any updates to the theme would override your edits unless you put those in a child theme).

    Upload the image. Get the path of the image after it uploads (click Edit in Media Library and the path is on the right side in a greyed well).

    In the Appearance > Widgets area in the admin section, add a text widget above the sidebar widget that is creating the Of Interest section and then include the code

    <img src="path/to/image.jpg">

    To hide on small screens you will need to add a media query like this:

    @media screen and (max-width: 767px) {
       .hide-mobile {
       display:none;
       }
    }
    

    You can change the width px to whatever your preference is. Devices vary.

    Then you would append the class to the URL like <img src="path/to/image.jpg" class="hide-mobile">

  2. for Header you should edit the header.php file (of your theme), you can change the HTML code as you want.
    for right side, like the other site, you can edit the sidebar.php file (of your theme), again you can change the HTML code as you want.

    Enjoy your code.