Tag archive for "wordpress-plugin"

Import WXR files from server or on plugin activation

I recently patched the WordPress reset plugin to make it possible to reactivate multiple plugins after the reset. Until sivel releases an update you can download the patched version from my server. As I frequently need to wipe WordPress installs during development I was looking for a way to auto-load ... more

Set static front page and blog page programmatically in WordPress

You want to make sure the About and Blog pages exist, so create them before if necessary, see wp_insert_post() more

Custom WordPress SQL query for multiple meta values

To check for multiple custom fields you have to join the meta table twice. more

Run code when a new blog is created

Run some code when a new blog is created. I'm not sure, but I guess this code has to be in a network-activated or mu-plugins plugin. Maybe having this code enabled in the blog you're using will suffice. more

Custom taxonomy with meta data

This snippet shows how you can add metadata to your existing custom taxonomy. So you can use update_metadata() and get_metadata() on your taxonomy. The filter on switch_blog is only necessary if the code runs on a blog network (recommended to implement anyway). The name of the database table is very ... more

Order posts in a $wp_query manually

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

A Better Related Posts Plugin

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

Better Recent Posts Widget

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

WordPress Pastebin

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

Simple upload field for WordPress plugins/themes

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