Although displaying all your latest posts in Wordpress may seem like a no-brainer (after all, the default home page already displays your “Latest Posts”), doing so is kind of tricky if you are trying to do it in on a custom page.
Here’s a little code that can help you accomplish that.
08.13.2010 // Continue Reading »
A big part of the Wordpress theme development process is to asses what each possible HTML element will look like (images, tables, lists, paragraphs, etc). WPCandy.com has the right sample content for that.
08.03.2010 // Continue Reading »
In WordPress, if you need to automatically add tags to a post via a PHP script, the best way to do it is via the wp_set_object_terms() function. There is no handy “wp_insert_tag()” function, or something like that, so look no further.
06.15.2010 // Continue Reading »
When developing for WordPress, sometimes you may need to create a PHP script that will automatically login a user so you can enable user functions. The WorpPress function wp_singon() is the perfect solution.
06.14.2010 // Continue Reading »
When programming for WordPress, sometimes you may need to get the ID of the last post that was inserted to the database (à la MySQL’s ‘LAST_INSERT_ID’). Here’s the thing: the wp_insert_post() function returns the newly inserted post’s ID, so you can use it to perform more stuff on the post right away, without having to mess around with any SQL commands to retrieve it. Clever, huh?
06.14.2010 // Continue Reading »