Tag archive for "wordpress"
Script to migrate WordPress plugins from SVN to github
Update: This script is almost obsolete as github will switch to their v3 API on may 1st, 2012 and doesn't display the API token any more... With this this script you can easily migrate a WordPress plugin from the wordpress.org svn repository to github. This script will NOT import the ... more
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
How to minify WordPress theme stylesheets properly
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
Dynamic search form for a WordPress 404 page
Show the user a useful search form when on a 404 page. Turn the query string into a search. 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
I am Nicolas Kuttler, a web developer, system administrator and IT consultant from France, currently living in Germany.