Add post formats to categorized posts

This here site predates post formats in core, so many of my older posts are categorized with a post format but missing an actual post format. Now that I’ve switched to the lovely TwentyThirteen, I decided to fix things up. Here’s the bit of PHP I wrote: [sourcecode language=”php”] global $wpdb; $post_ids = $wpdb->get_col( "SELECT ID […]

P2 Resolved Posts: Only mark a specific category as unresolved

In the WordPress.org forums, ameeromar asks: Hey would it be possible to limit the automatically marking as unresolved to one category? This would be particularly useful for my category ‘tasks’ which need to be marked as unresolved when published (and then marked as resolved when completed). It’s totally possible using a combination of a couple filters. Here’s […]

Include posts by matching authors in your search results

Out of the box, WordPress’ search isn’t that great. It only returns posts based on a LIKE query against the post title or post content. Often, you’ll want it to match against other data associated with your post, possibly including the author, tags, post meta fields, etc. These queries can get complex to perform on […]

Allowing authors to set co-authors

In the WordPress.org forums, whoaloic asks: I have a site with multiple authors. I would like to allow authors who create a post or a page to give rights to other authors. For now, only administrator and editor can do that. Is there a solution? Yep, totally doable. By default, Co-Authors Plus defaults to ‘edit_others_posts’ […]

Show biographies for co-authors at the end of your post

In the WordPress.org forums, doubleedesign says: I want to add the authors’ biographies to the end of each post. Awesome… it’s pretty simple to do. Conceptually, what we need to do is load our co-authors, and then loop through printing the relevant information for each one. You’ll want to put the following code snippet within […]

Scripting my application launch process

Every day for work, there’s several applications I always use. The other day, I put together a quick and dirty bash script for opening all of them at once. I’m terribly inexperienced at this, so don’t poke fun, only offer good suggestions for improvement… [sourcecode language=”bash”] #!/bin/bash # Open all of the requisite applications echo […]

Show matching terms in your search results

WordPress’ internal search isn’t all that great out of the box, as I’ve discussed before. For instance, tags and categories aren’t included in the search query; as such, if your post is tagged “apple”, but there is no mention of “apple” in the title or post content, the post won’t be included in your search […]

Co-authors in your RSS feeds

In the WordPress.org forums, razorfrog asks: Short of editing core WordPress code, is it possible to display the multiple authors in the site’s RSS feed? Of course there is! From the source code, we know the RSS feed template uses the_author() to display the post’s byline information. Furthermore, the_author() echoes get_the_author() which is a filterable […]