You know, instead of hacking the core files (for shame!) you could have just as easily written it as a plugin…..
The only hacks to the core files were the rss files, to change the title. The other code I wrote was in the template itself!
I hate to say this… Though I can cobble together a little bit of code (especially if I keep trying long enough), I don’t consider myself the greatest coder in the world, don’t write PHP code regularly, and don’t know much about how to write wordpress plugins. I guess I’ll have to figure that out some day. For now, I was just happy to have most of this stuff incorporated into a theme, since that should be mostly compatible with future releases. (If I have to go back and fix the titles on the rss feeds, that won’t take me too long).
Can anybody else point me in the right direction? I was especially interested in knowing if getting a list of categories and authors (without links) wasn’t possible with WordPress’s native functions and if I’d taken a good approach with my own solution.
Cant you just use list_cats and use PHP to pull out the category names? That way it will not depend on the database structure also and might be forward compatible.
Just my 2 cents.
You’re saying use PHP to parse what’s getting returned from list cats and strip out the links? Could I still loop over it to format things how I want?
I’ll have to look into this
That is what I am suggesting. I would have really preferred wordpress supporting category_loop, author_loop etc. (similar to post loop) and providing list_cats, wp_list_cats on top of those as helper functions. I don’t know much about how WP development take place, I am willing to take this up if the developers so wishes.
In the absense of that, I suggest we use published interfaces rather than accessing database directly.
- The topic ‘Getting a simple list of categories and authors, WITHOUT links!’ is closed to new replies.