Headline Rotator

Posted 03/17/2009

Necessity being the loving mother of invention, I finally undertook the arduous task of creating my very own custom WordPress plugin. I’m in the process of submitting it to the repository over at WordPress.Org, but in the meantime I wanted to quickly explain what it does and why it’s awesome.

Simple Headline Rotator

Download

A lot of websites are including rotating images and headlines on their front pages. This is generally good, since it reduces the amount of static landing pages out there and promotes spreading content.

However, most of the WordPress plugins I found out there would only work properly if an image were attached, and a great many of my clients don’t want to have to upload a new image just to include a story in their front page rotator. So I started looking, and I found a JQuery site that had an interesting idea.

This is my first attempt at creating a WP plugin, so I expect to have done a large number of things wrong. Please don’t hesitate to let me know what they are in the most egregious manner possible.

See it in action at RealPolitech.

Installation

Once you’ve installed and activated the plugin, just put this piece of code in your template wherever you want your rotator to appear:

<? php headline_rotator(); ?>

Features

  • Pulls the last 5 titles/excerpts from the FrontPage category.
  • Options page where you can set the width/height of the slider box.
  • Uses JQuery and Javascript to rotate the stories from left to right.
  • After the first rotation, the scroll animation speeds up.
  • Hovering the mouse causes the rotation to pause. Moving it out resumes it.
  • Titles are contained within <h3> tags, the Read More link is contained within <small> tags.

Wishlist

If I ever figure out how to do any of this stuff, it’s what I’ll include in the next release.

  • The user gets to pick the category name.
  • An “add border” option.
  • The user can decide what direction the scrolling moves.
  • The user can set the time each headline will stay up there.

Back - [top]