Post-style permalinks for your custom post types. Give your custom post types the %year%/%monthnum%/%day%/%postname% permalink style you know and love.
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 […]
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 […]
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 […]
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’ […]
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 […]
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 […]
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 […]
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 […]
Code snippet for registering new Post Author Box tokens and setting replacement values using Co-Authors Plus as an example.