TagWordPress

Post Formats in WordPress: Breaking Down Those Quotes

Here’s a function that would grab the contents HTML and parse out the first quote (blockquote element) together with it’s cite (usually the quote author) and the remaining text that comes after the quote. This is useful for when dealing with the quote post format in WordPress. function get_blockquote() { $dom = new DOMDocument; $dom->loadHTML( apply_filters( 'the_content'...

Regex Replace in MySQL or lib_mysqludf_preg in Ubuntu Linux

I’ve been working a lot with MySQL lately, especially after the major theme and plugin upgrades on my blog. I was dealing with a bunch of content issues like redundant shortcodes and post meta, URL changes, images directories and more. One simple solution would be to grab the database dump, perform various search and replace operations and then feed it back in, and my goal was to do that...

New Plugin: Posts Screen Excerpt

New Plugin: Posts Screen Excerpt — makes an excerpt column available in the All Posts screen in WordPress. Useful for when working with posts without titles, where (no title) doesn’t say much about which post you’re about to edit.

WordPress Posts Without Titles in RSS feeds

Some RSS readers and aggregators will display things like “no title” or “untitled” for posts without a title in WordPress, which looks pretty awful. I’ve been playing around with post formats lately and things like links, quotes and images are fine without titles sometimes, but at other times they do require a title, so we can’t just “disable/hide”...

Delete Cached Copy in Capistrano

Quick tip! If you’ve changed the Git repository for your project and deploying via Capistrano while using cached copies you might get a “doesn’t exist” error because your cached copy is still pointed at the old Git repository. You can fix this by manually logging into your application server, browsing to the shared directory and deleting the cached-copy directory...

Moving Plugin Support to Github

Got tired of dealing with “support” comments and bug reports on my blog, so now I’m opening Github repositories for some of my WordPress plugins. The first two are Twitter Friendly Links and Technical Support. Eagerly waiting for the first pull request now ;)

Advanced Topics in WordPress Development

Andrew Nacin and Otto Wood gave a great talk at WordCamp Montreal a couple of weeks ago on Advanced Topics in WordPress Development. They cover some of the cool stuff available in the WordPress like taxonomy and meta queries, the filesystem API, transients and embeds. Great to learn from the pros ;)

WordPress in a Subdirectory and XML-RPC

Quick Tip! If you’re experiencing problems with the WordPress mobile application because your WordPress installation is in a subdirectory (for example wordpress) you should copy the xmlrpc.php file to your website root so it’s accessible via example.org/xmlrpc.php and edit the boostrap path in that file to point to your subdirectory: /** Include the bootstrap for setting up WordPress...

Using the Google Analytics API in WordPress

There’s a great article over at Theme.fm on Using the Google Analytics Data Feed API in WordPress which covers some pretty interesting techniques to grab and make use of data stored in your Google Analytics profile, like what are your top 10 posts this month, or what were the most searched ones, etc. I’ve authored that article so feel free to ask questions ;)

Unreplied Comments in WordPress

Dealing with comments. What a mess! I’ve been quite busy lately so I hadn’t had too much time to reply to each and every comment on my blog, but I’d really love too, seriously! The problem however is that there were times when I replied to somebody, and times when I hadn’t and now with this mess in my comments admin it’s impossible to find out ones I haven’t...