Tag archive for "wordpress"

Build a custom WordPress query and order the posts however you want them. Notice that this won't work properly if you page results, so it is only useful in very specific cases. Btw, wrap everything into your class and get rid o the global var when you use this ;-) more

If you build WordPress theme you'll eventually come to the point where you want to minify the stylesheets. But the WordPress theming system has a fundamental flaw: It expects theme headers like name, version information etc. to be in the style.css. This is bad because removing the headers from the … more

Show the user a useful search form when on a 404 page. Turn the query string into a search. more

There are many plugins that find related posts for WordPress, and I was happy to use one of them in the past. However, WordPress evolves. One of the biggest change was the addition of custom post types. They are very useful and I use them a lot for my own … more

The built-in recent posts widget in WordPress isn't too bad, but it doesn't support custom post types. That's why I wrote this new widget. You can choose any custom post types you want. This way you can always get a list of recent updates on your blog. The widget ignores … more

This plugin is for you if you like sharing your code. Turn your blog into a pastebin and keep your own code on your own site. You can tag your pastes like you tag your normal posts, and visitors can leave comments if you allow it. I wrote this because … more

This makes it possible to have the taxonomy below some post type slug, e.g. the post type is at /cars/ and taxonomies are at /cars/manufacturer/, /cars/year-of-construction/ etc. You want to register the taxonomy with the same $slug. more

Run the filter whenever you want your post type in the main loop. Add is_home(), is_category() etc. Example is for the post type 'paste'. more

There's obviously a little context missing for this paste, but the basic idea should be clear ;-) more

With this you can upload images through your plugin/theme. They are saved as attachments. Please add nonce fields for security reasons. more