Aug 16, 2013, by admin
In the post we are going to see how to manage the smileys in blog posting in WordPress hope it will be useful to you all
f you turn off graphic smileys, whatever you type in plain text will remain, and be displayed, as plain text.
Texts to Make Smileys?
How Can I Have Different Smiley Images Appear?
The easiest way is to filter the smilies.
Upload the images you want with the same name to your server (say in wp-content/images/smilies) and put this in your theme’s function.php:
add_filter(‘smilies_src’,’my_custom_smilies_src’, 1, 10);
function my_custom_smilies_src($img_src, $img, $siteurl){
return $siteurl.’/wp-content/images/smilies/’.$img;
}
The smiley images in WordPress are automatically given a CSS class of wp-smiley when they are displayed in a post. You can use this class to style your smileys differently from other post images.
For example, it’s not uncommon to set up images in a post to appear on the left-hand side of the content with text flowing around the image. The CSS for that might look like this:
.post img {
float: left;
}
This would typically affect all images in a post, including your smiley images. To override this so that smileys stay inline, you could add this to your CSS:
img.wp-smiley {
float: none;
}
For more on CSS in WordPress, you might want to start here.