• Do you know how I can have an image be static on every post automatically? I know it has to be in single.php and give it a class. I don’t know how to do this. Below is my single.php in a pastebin. Also here is the link to the image I would like to display (http://kyfreshstart.com/subscribe-now.png). One last thing also, I would like to have it set to 1 page break.

    http://pastebin.com/b1kUDhJY

    Any help would be appreciated.

    Thank you in advance.

    Casey

Viewing 6 replies - 1 through 6 (of 6 total)
  • Not sure, but maybe you could do it with the theme?

    Or a style sheet that you could use for every page and post you create.

    ? not sure…

    You can put this in single.php for the post pages or go into “Current Theme Options” and put it in the box labeled “Notice” to put it on the homepage(make sure you check the box).

    <img class="staticimage" src="http://kyfreshstart.com/subscribe-now.png">

    And in the style.css

    .staticimage{position:relative;
                  top:whatever;
                  left:whatever;}

    You’ll have to play with the numbers for top and left to position it where you want it on your pages.

    Unless you want it to be truly static then you would make a slight change in the css.

    .staticimage{position:fixed;
    top:whatever;
    left:whatever;}

    Thread Starter tccollins

    (@tccollins)

    Ok, but how do I make it show up where it is currently in that link? I know how to change the alignment and pixels, just don’t know where to put it into single.php

    Thank you FishDogFish for being so patient with me.

    You may be able to put it close to where you want it, by placing it near the top of the file, it really depends on the positioning you’re trying for. So experiment with that part.

    Final Positioning

    You might have to float it left or right to get it close to where you want it, then use top,left,right, and bottom to position it.

    If you want it close to where it is in your link, then top and left or top and right will work pretty good.

    You’ll just have to experiment with the positioning in the style.css

    Remember though, with position:fixed the image will stay where you put it, even when you scroll down the page the image will scroll down with you.

    Thread Starter tccollins

    (@tccollins)

    I still can’t figure out where exactly to put it in the code.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to create a static image on every page’ is closed to new replies.