Forum | Hot Tagged Topic bars

You must be logged in to post Login

Hot Tagged Topic bars

UserPost

9:30 pm
November 1, 2009


arobinsonwku

Member

posts 32

Is anyone aware of a plug-in out there that would work with the gazette theme where it would identify 5-7 popular tags and place those under the category bar? Or something similar where even if the administrator had to select the tags, they would still be up there.

1:32 am
November 3, 2009


Daniel Bachhuber

Admin

posts 102

I'm not aware of a plugin that will do that automatically, but I can think of a way you might do it manually. On our home page, we have three slots for featured forum conversations. To set those featured slots on the backend, it looks a bit like this:

I think one thing that you could do is build a plugin like this where you pre-define those 5 to 7 slots and then determine which tags they display with plain-text fields or drop-downs with your entire taxonomy. Changing what displays on the front end would just be a matter of updating the tags on the backend and then hitting "Save". Is there functionality you'd want beyond that? Do you have a mockup for what you'd want it to look like?

3:12 pm
November 3, 2009


arobinsonwku

Member

posts 32

Post edited 8:14 pm – November 3, 2009 by arobinsonwku


First off, is that backend feature a plugin?


I don't have a site in mind of what I want it to look like, but I did some nice Skitch work to demonstrate what I had in mind:


herald front
Uploaded with plasq's Skitch!

3:40 pm
November 3, 2009


Daniel Bachhuber

Admin

posts 102

I think I built the backend feature in the theme, but it'd be pretty easy to translate to a plugin. I see exactly what you're thinking for the Hot Topics; it'd be pretty easy to do.

5:47 pm
November 3, 2009


arobinsonwku

Member

posts 32

Sounds good Daniel. How would I go about translating the backend feature into a plugin?

11:28 pm
November 3, 2009


Daniel Bachhuber

Admin

posts 102

You can download the code I've put together to get you started. That will give you an admin screen to change the settings on the backend. When you update the settings, they're stored in WordPress' options table. To then get that information to display on the front end, you need to pull the settings from the options table and display the variables. It looks something like this:

<?php $fp_settings = get_option('copress_fp_settings'); // Get the front page discussion items from the admin ?>

Jump in: <a href="<?php echo $fp_settings['copress_fp-dis_one-url']; ?>"><?php echo $fp_settings['copress_fp-dis_one-title']; ?></a> <a href="<?php echo $fp_settings['copress_fp-dis_two-url']; ?>"><?php echo $fp_settings['copress_fp-dis_two-title']; ?></a> <a href="<?php echo $fp_settings['copress_fp-dis_three-url']; ?>"><?php echo $fp_settings['copress_fp-dis_three-title']; ?></a> <a href="<?php echo bloginfo('url'); ?>/forum/">More conversations &rarr;</a>


To take the code I've uploaded and make it a plugin, you'll want to look over the WordPress documentation for the basic structure of a plugin. Once you get started, I'd be happy to answer more specific questions you have!


5:26 pm
November 5, 2009


William P. Davis

Veazie, Maine

Admin

posts 65

What do you mean by most popular tags? The tag with the most posts won't necessarily be the most popular, but if that's what you're looking for, this will get you the seven most popular tags and return a list:


<?php wp_tag_cloud('smallest=10&largest=10&number=7&format=list&orderby=count&order=DESC'); ?>

wpdavis.com | Editor in Chief, The Maine Campus | Associate, CoPress | will@copress.org | 207.660.5342

1:01 pm
November 21, 2009


Chris Ullyott

Fullerton, CA

Member

posts 66

This is great! We were just thinking about doing this. The LA times does it well: http://www.latimes.com/. We were thinking of having the plugin take the most popular tags that are not more than 10 days old (it would filter out tags without a post written within the last 10 days).

IMO, tags really aren't that useful unless they are used with a feature like this!

Chris Ullyott | Daily Titan, CSU Fullerton | cullyott@dailytitan.com

11:40 am
January 21, 2010


arobinsonwku

Member

posts 32

Since we made our featured tags live today, I thought of some other features for this bar.

You can really make it whatever you want to make it by tricking the system.

I have already thought about changing "Hot on the Hill" to "Breaking News" and then deleting two of the tags and creating a headline that also works as a URL.

Seems like you can be really versatile with this feature the more I think about it.

5:08 pm
January 29, 2010


arobinsonwku

Member

posts 32

I just wanted to add to this for anyone else interested in doing something like what we did that we have already started to see results. Those links have been clicked on close to 300 times since Sunday.


We don't have a scientific way of determining what's up there, we just kind of choose. Like I said though, it's been very effective.


About the CoPress forum

Most Users Ever Online:

119


Currently Online:

11 Guests

Forum Stats:

Groups: 1

Forums: 7

Topics: 107

Posts: 538

Membership:

There are 151 Members

There have been 2 Guests

There are 5 Admins

There is 1 Moderator

Top Posters:

Chris Ullyott – 66

Mo Jangda – 35

arobinsonwku – 32

laurenmichell – 21

CMLife – 16

sbressler – 15

Administrators: Daniel Bachhuber (102 Posts), William P. Davis (65 Posts), joey (39 Posts), Greg Linch (14 Posts), adam (1 Post)

Moderators: Andrew Spittle (49 Posts)