How To Make Images Rotate

Rotating images in WordPress is easy. All you need to do is add some code to the image class you want to rotate and you’re done. You can make your avatar rotate on hover, make all images in a single gallery rotate or simply make a single image rotate anywhere on your site.

In this really cool tutorial, you’ll get the code to:

  • Rotate your avatar image in your author box
  • Rotate all images in a gallery
  • Rotate any single image regardless of whether its in a post, page or widget.
  • And rotate your featured post thumbnail images on your archive pages

rotate gallery images

Note: All CSS code should be pasted at the end of your child themes style.css file.

Rotate Avatar Images

Here’s the code to rotate your avatar or Gravatar image site wide. Change the class if you need to however this code will work for people using Gravatar.

Rotate Gallery Images

This code works for images created using the native WordPress gallery. You’ll need to change the class if you’re using a plugin which uses a different name for your gallery.

Note: The gallery number can also be changed if you’ve created multiple galleries in WordPress.

Rotate Single Image

You need to use Firebug or view your source code to grab the i.d for your image.

Rotate Featured Post Thumbnail Image

This code will rotate all your featured post images on your blog and other archive pages.

Other Affects With Images

Related Tutorials


Comments

4 responses to “How To Make Images Rotate”

  1. Emily Avatar

    🙂 You’re so funny!
    I’m trying out this meetup.com thing. It’s at meetup.com/wordpressforsmallbusiness
    But, I think I’ll change it over to my regular site at classesforwebdesign.com and see how that goes.
    Hey, maybe I’ll visit you in Phuket, Thailand sometime! Tell me the benefits, okay?

    1. Brad Dalton Avatar
      Brad Dalton

      Why don’t you write a guest post here and talk about it?

  2. emily journey Avatar
    emily journey

    Hi Brad! I am very much enjoying your latest posts! As a person who offers face-to-face classes in WordPress, I have been sharing your posts with my students. 🙂
    You have some good stuff!
    BTW, the orientation of your comment structure is a little confusing. The “name” and “email” labels appear to be opposite of where they should be. Maybe a little European? Anyhoo, seems a little backwards.
    Also, on this particular post, I would recommend inviting your intelligent readers to “comment below” as it is not too clear that option is available.
    I love everything you have done for me! XOXOX
    Warmest regards,
    Emily

    1. Brad Dalton Avatar
      Brad Dalton

      hahaha. Where have you been hiding and why have you taken so long to comment?

      Yes, the comments is weird, not sure why but its o.k.

      Thanks for the warm comment Emily.

      I’d love to see what you are teaching your students.

      P.S. Hope its not migration!!

Leave a Reply

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.