1955 Design - Web Design - WordPress - Rochester 48307 | Rochester Hills 48306 | Oakland County Web Design

Michigan WordPress Website Design

  •    
  • Team
  • Work
  • Process
  • Cost
  • News
  • Contact

Custom WordPress Smiley Icons

July 21,  2007 by David Zemens

Who wouldn’t want their own custom WordPress smiley icon?

I often visit at Mike Cherim’s Beast-Blog. Mike is a genius withto WordPress, and I always learn something new when Mike writes about tweaking WordPress. Adding Your Own WordPress Smilies explains how to make your own personal smilies / emoticons for use with WordPress. Following Mike’s instructions, I was able to make a personal 1955 Design smiley in a matter of minutes. :1955:

Using a text editor, open the functions.php file in the wp-include directory. Look for an array that contains the following code:


     ';)' => 'icon_wink.gif',
    ':!:' => 'icon_exclaim.gif',
    ':?:' => 'icon_question.gif',
    ':1955:' => 'icon_1955.gif',

I added the last line of code and created a small icon in Photoshop and named it icon_1955.gif. Save your icon in the /wp-includes/images/smilies directory. That’s all there is to it. Any time I type the text :1955: into a line of text, the graphic smiley icon is inserted in its place. Pretty cool.

Custom Formatting with CSS Markup

The one tip I can add is that you might have to make some adjustments to your CSS file to make the smilies work correctly. On this website my CSS floats images and adds a border by default. So I needed to write some CSS markup to keep the smilies inline and borderless. No problem. WordPress automatically adds the class wp-smiley to code that it generates for all smiley icons. You simply need to write some CSS markup to handle that class. In my case, I had to make certain that the smiley icons did not float and remained as inline images with no padding and no borders.


.wp-smiley {
    padding:0 0 0 0;
    margin:0 0 0 0;
    float:none;
    display:inline;
}

That’s all there is to it. Now the smiley image appears in the text as if it was another text character.

In fact, the little graphic at the end of this paragraph is another WordPress smiley! Many thanks again, Mike, for helping the world become more proficient with WordPress.

:eof:

Filed Under: Most Popular, Web Stuff, WordPress

About David Zemens

Web designer. Lover of all things WordPress. Semi-professional dog walker. Recovering iPhone addict. Husband. Father. Grandfather to Zoey, Jacob & Andrew. Not necessarily in that order.

Let’s Get Started Today!

I am currently taking on new projects and would love to hear from you. Get in touch with me today and learn how I can put all the pieces together for your new website. You'll soon find out that I'm good at working puzzles.

Stuff I’m Talking About

  • Rochester Hills Michigan Web Design
  • David McElroy
  • 5 Signs You Need a New Website
  • Most Blessed Sacrament Cathedral
  • Miss Madison Unlimited Hydroplane
  • Great CPA Websites
  • Feedburner
  • What Now?
  • Believe in Miracles
  • WordPress Custom Fields

Get Social

  • Email
  • Facebook
  • Twitter

I Work Here

Map of our location

Even though I work in metro Detroit, I have worked with clients from Seattle, Washington to Jacksonville, Florida. That pretty much covers all the United States.

I can work with your project, too!

Where Are You Located?

I am located in Rochester, Michigan but have worked with clients from coast to coast. Distance is never a problem. I’ll communicate with you quickly and you’ll feel that I’m just around the corner – no matter the distance between us.

1955

I was born in 1955. I'm old enough to remember the internet before "www" was around. Just white text on a black screen. No graphics. This means I'm experienced. Why not use my experience to your advantage?

Ready to Start Your Project?

I am currently taking on new projects and would love to hear from you. Get in touch with me today and learn how I can put all the pieces together for your new website. You'll soon find out that I'm good at working puzzles.

Etcetera

  • Site Info
  • Site Map

Connect With Me

Learn more about what I've got to say. Talk to me. Share something. Learn something. Get social. Or if you'd prefer you can contact me in more traditional ways, too.
  • Email
  • Facebook
  • Twitter
Follow @1955Design

Find It

1955DESIGN · Rochester, Michigan · (248) 830-7393
© 2005–2023 · 1955 Design · All Rights Reserved · Admin
1955 Design builds websites with WordPress and the Genesis Framework