DIY মিডিয়া হোম লোগো

আপনার নিজের হোম থিয়েটার এবং হাই ফাই সেটআপ নকশা ও নির্মাণের জন্য চূড়ান্ত সাইট.

0ডেল 3130cn লোগোAdding a print icon to print individual blog posts

In addi­tion to this blog I also have a blog about recipesI decided that I wanted a print icon on the main page for each post so that people can print the recipes. Googling provided vari­ous sug­ges­tions, none of which worked. How­ever, I even­tu­ally cobbled togeth­er the fol­low­ing, which seems to work…
Edit the code of your blog and find the code

<!-- email post links -->

Above that put the following…

[javascript]&লে;লিপি&gt;
func­tion printPost(postUrl)
{
doPrint = true;
var pw = window.open(postUrl);
}
যদি(opener.doPrint == true)
{
window.print();
window.onfocus = func­tion() { window.close(); }
}
&লে;/লিপি&gt;

&লে;a expr:href=’&quot;javascript:printPost(&quot; + &quot;&quot;&quot; + উপাত্ত:post.url + &quot;&quot;&quot; + &quot;);&quot;&gt;&লে;img src=‘https://siteresources.worldbank.org/images/Print_plain.gif’/&gt;&লে;/একটি&gt;[/javascript]

And you’re done!

Cred­it in vari­ous parts goes to…
Con­sum­ing Experience
Blog­ger Plugins
Sharkyso­ft

উত্তর দিন