#WordPress: Recent Comments by Category

. Monday, October 05, 2009
  • Agregar a Technorati
  • Agregar a Del.icio.us
  • Agregar a DiggIt!
  • Agregar a Yahoo!
  • Agregar a Google
  • Agregar a Meneame
  • Agregar a Furl
  • Agregar a Reddit
  • Agregar a Magnolia
  • Agregar a Blinklist
  • Agregar a Blogmarks

Yet another WordPress code snippet ;) I’ve got two major categories in my upcoming project – Blogs and Arts. In the archive, somewhere in the sidebar, I’d like to output the recent comments only from the chosen category, excluding the ones that are from the other category. The most difficult part here is to figure out proportions, because running this hack recursively may eat up all your memory. For instance you have two categories and you’d like to output 10 comments for each. The posts in the first category get commented twice as often as the posts in the second category, so the proportions here would be approximately 2:1, but it also depends on how often “the switch” is.
get the code at kovshenin.com

from geektechs

0 comments: