Support » Themes and Templates » Put image in upper-right corner

  • Hi

    I’m using WordPress 3.2.1 and the Twenty Eleven 1.2 theme.

    I’d like to put an image where the the search is.

    I’ve removed the search (I don’t want it)

    Taken from the ‘searchform.php’ file:

    <span style="display:none;"><form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>">
    		<label for="s" class="assistive-text"><?php _e( 'Search', 'twentyeleven' ); ?></label>
    		<input type="text" class="field" name="s" id="s" placeholder="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" />
    		<input type="submit" class="submit" name="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" />

    I’d like to put a picture its place and then make it randomly show another picture on another page. Can this be done? I have reasonable knowledge of CSS and HTML but I always end up with this:

    (I’ve had to censor out the titles because the website isn’t open to the public yet)

    Any assistance would be greatly appreciated 🙂

Viewing 1 replies (of 1 total)
  • Firstly, if you’re using the twentyeleven theme and want to change things, it’s important that you create a child theme and make your changes there.

    Secondly, trying to help is really hard without a site to look at via a link. We can only answer in general terms because there’s nothing specific to see.

    So, in general terms, you add your image to, probably, the #branding div in your child theme’s header.php file. Then you style it to position it exactly where you want it. Either that or you need to use a widget, if you can find one, that does what you want.

    You’ll need to write some PHP if you want to insert random images without using a widget. Using a widget would be the simplest answer.

    Hopefully others on the site can advise you about widgets of this type. They’re not my speciality and I don’t even know if they exist.



Viewing 1 replies (of 1 total)
  • The topic ‘Put image in upper-right corner’ is closed to new replies.