How to add jpg watermarks in all pages

One of my visitor asked me one interesting question

want to add 2 images as a watermark on every page. One for the top, and one for the bottom. If it can be respecting the proportion for each resolution.
An example, this is the original page:
http://www.greenfuelsbio.com/conversion-de-plasticos-en-diesel/
I want to make it so that like this:
http://www.greenfuelsbio.com/watermarks.jpg
Is there any way to do this?
Greetings and thanks.

 

 

The solution is

 

Yes it can be done.

1. Create a child theme if you don’t already have one.
2. In functions.php of your child theme, add the following code:

add_action('get_footer', 'insert_bottom_background');
function insert_bottom_background() {
	echo '<div></div>';
	}

3. In style.css of your child theme, add the following code (assuming your images are called top_background.png and bottom_background.png and are both placed in the folder img, in your child theme’s folder. I also assumed your bottom background image is 60px high. If it’s higher or lower, modify the height declaration of .bottom-background in the code below):

#main-wrapper {background: transparent url('img/top_background.png') no-repeat center top;}
.bottom-background {background: transparent url('img/bottom_background.png') no-repeat center top; height: 60px;}


resizable backgrounds are not possible through CSS. A workaround would be to place img tags behind the content and resize them relative to the page width, using javascript, but that’s far beyond the scope of this forum.

If you change the image with an editor it won’t cover 100% of other screens. In your case I’d say a width of about 800px would look decent on all resolutions, cropped on small screens and covering content width on larger ones.

As a sidenote, your backgrounds would look better if you replaced the white part with transparency using a photo editor and saved them as png’s.


admin

About Agni Shukla

I have 3 year vast experience on WordPress. I have done over 200 websites.

3 thoughts on “How to add jpg watermarks in all pages

  1. Thank you very much for the help.
    Hope your support will serve more people.
    Greetings.

  2. Tully’s chief executive Scott Pearson said in a statement to the newspaper that the agreement puts it in position to emerge from bankruptcy next year as “a much stronger company.Now for a quick summary of our financial results, revenues for the fourth quarter were $98.Heath Henderson was diagnosed five years ago and feared the worst.Price range will vary from 150 to 500 bht depending on what you select and the length of time.”The way people seek medical attention after they’re injured in a crash changes,” says Lynn McChristian, Florida representative for the insurance education nonprofit Insurance Information Institute.e.Finally, Svedana is a fullbody steam therapy that aims to dilate the channel systems of the body allowing the stored toxins (ama) to move back into the digestive system.His system evokes the apprenticeships of an earlier era, but it also demands the dedication that many modern Japanese corporations require of their workers.My view is try and send the card(s) back as they obviously are triggering some type of incorrect addressing.Benton MacKaye Trail: Shallowford Bridge to Bushy Head Gap Hiking Because of two long road walks, this part of the BMT will appeal mostly to endtoend hikers.
    Comment Guidelines: The SportingPulse Network is made up of players, families and passionate sports followers like you who have a strong opinion about sport.
    1.
    (Agnipurana Ch.
    He kept in touch with Ted and Alice.
    Barbers try to get back business with upscale shops The room where Crawford trims beards, shaves necklines and offers hair replacement has a babbling rock fountain and a view of a lush courtyard.

    http://gm.hpe.sh.cn/discuz/viewthread.php?tid=250534&pid=13342056&page=674&extra=page%3D7#pid13342056
    http://www.bocinski.com/addguest.html
    http://eden545.net/dz/viewthread.php?tid=157404&pid=2123947&page=303&extra=page%3D5#pid2123947

    http://www.takedown.com/guestbook/addguest.html
    http://momcenter.com.ph/www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2Fmomcenter.ph&width=292&height=293&colorscheme=light&show_faces=false&border_color&stream=true&header=true&appId=159147537521069
    http://www.vanmarter.com/guestbook/addguest.html

    http://forum.ofscards.com/unnuke/modules.php?mop=modload&name=Splatt_Forums&file=newtopic&forum=11+
    http://www.ilritrattodellasalute.org/forum/viewtopic.php?f=12&t=145291
    http://gothictale.pl/forum/index.php/topic,293531.new.html#new
    http://szgkvizsga.hu/phpBB3/viewtopic.php?f=3&t=43022

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>