Multisite installation combining subdomains and subdirectories

If the subdomains are just for looks and don’t actually impact data. Then have all subdomains point to the same place, install the domain mapping plugin: http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/ That may help. Alternatively you could just setup manual aliases to the main domain and as long as they all point to the exact same spot and you … Read more

Retrieve the template directory URI via global or get_template_directory_uri() every time?

I would stay stick to the function. PHP caches functions for speed and efficiency. In some situations, using a function is faster then using a variable. There are other benefits too – imagine if you changed the name of your variable – you would have to go and update every piece of code where it’s … Read more

How to set custom upload directory per user after moving content directory

With credits to petermolnar via irc://freenode.net/wordpress I can answer my own question. The key is to set an upload-dir filter in the theme’s functions.php: function per_user_upload_dir( $original ){ // use the original array for initial setup $modified = $original; // set our own replacements if ( is_user_logged_in() ) { $current_user = wp_get_current_user(); $subdir = $current_user->user_login; … Read more

Creating a Link Directory using WordPress?

A great starting point would be Mike’s answer to the question about cloning CrunchBase. You’ll want to do something similar with custom post types for entries in your directory. If you want to allow visitors to submit sites, you could perhaps use the TDO Mini Forms plugin to allow visitors to create a new listing, … Read more

Group Posts by First Letter of Title

once up a time i did a client project where i had to have archives by first letter. thinking back i’m wondering if shouldn’t have just created a hidden taxonomy and then saved the first letter as a term in that taxonomy. anyway, here’s what i actually did: /* * Function Create Array of Letters … Read more