Do you really need that plug-in? Maybe not, maybe yes…
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.
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.
Let’s say you want to server-side detect whether a user’s browser is the dreaded IE6 using PHP (instead of on the client side, which is usually done with conditional comments). Here’s how.
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.
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?
Sometimes you may want to center a div element within a page, whether vertically, horizontally, or both (dead center). Here’s how you can accomplish all of that using CSS.
Sometimes you may want to load a CSS stylesheet dynamically after your HTML page has loaded and certain conditions are met (for example, if an element with a specific class exists in the DOM). jQuery can help you accomplish that with a few lines of code, helping you save some bandwidth and make your page load faster.