WordPress provides a handy way to post announcements on your website. Using a combination of Posts, Widget Logic, and Post Expirator, you can display announcements when you have them, and hide them automatically when you don’t. Here’s how to set up your site for announcements:
Go to Plugins > Installed Plugins. Scroll down to Post Expirator. Click “Activate.” This plugin will allow you to set up the conditions for your announcements to expire, and tell WordPress what to do with expired announcements.
Scroll down to Post Expirator. Click “Activate.”
This plugin will allow you to set up the conditions for your announcements to expire, and tell WordPress what to do with expired announcements.
Next, set up the categories for the announcements that are current and expired. Go to Posts > Categories and select “Add New.” Then, add your categories. In this case, we are using “announcements” and “previous announcements.” Use whichever nomenclature works for you.
Now that you have the categories in place, you can post your announcement using the standard posts. Go to Posts > Add New.
Type in your post as you would a normal post or page, including the title and content.
Scroll down the page until you see the categories box. Assign this to the “announcement” category.
Scroll down further until you see the Post Expirator box. There, you can set the date you’d like the post to expire. Also, you can tell WordPress that, upon that expiration date, you’d like this to be changed to the “previous announcements” category.
Note that this uses “UTC” time (official U.S. Time), not Eastern Standard time. If you want to convert East coast time to UTC time, visit this site:
http://www.timeanddate.com/worldclock/converter.html
Publish your post as usual.
Next, you’ll need to set up the widget to display your announcement. To do so, go to Appearance > Widgets.
Select “Genesis Featured Posts” and drag it into the sidebar area where you’d like the announcements to display. This is a powerful widget with lots of features on how to display your posts. If you want to find out more on how to use this widgets features, visit this video on YouTube. (For the purposes of this tutorial, we are displaying only the post title.) Minimally, to make this announcements feature work, you’ll need to set the Widget Title, Category, and Widget Logic in the fields displayed below:
Widget Logic sets the conditions under which the announcements will display. In this case, we want this widget to display ONLY WHEN THERE IS A CURRENT ANNOUNCEMENT. This will prevent the widget from showing up empty at other times. In the “Widget Logic” field type in the following — assuming that your category for announcements is “announcements”:
get_posts( ‘category_name=announcements&numberposts=1’)
If you’ve used another category name, type that in where it says “announcements” above.
Click “Save” on the Genesis Featured Posts Widget.
Now, when you go to a page displaying that widget, you’ll see the Announcements displayed in the position you’ve placed it in your widget area. In this case, it’s in the sidebar beneath the primary navigation.
That’s it! From now on, simply post announcements by assigning the “announcements” category, and configuring Post Expirator settings, and you’re golden! Badda bing!