Attaching global meta to custom fields

I think the way I would tackle this would be a non-hierarchical taxonomy. That would allow you to tag the artist and such as well as give you a few fields to work with for basic data input…you also have the ability to expand, should you need it. If you’re going to have a lot … Read more

Gallery image must open up in fancybox directly not post page

Make sure that your galleries are set as Links to “Image File” and not to “Attachment Post” for Galleries and images. You’ll find the settings in the image/galleries pop-up window. I’m not familiar with your plug-in but you might need to manually add the fancybox class to each image. Another option is to add the … Read more

Activate Akismet on installation with akismet key

The link Bainternet provides looks quite promising. Now you only need to automatticaly add the API key. Akismet has a constant for this called *WPCOM_API_KEY* (source code). So you could add something like this to your wp-config.php file and Akismet would use it as API key. define( ‘WPCOM_API_KEY’, ‘abcd1234efgh’ );

WordPress loop: Display if posts exist

You can use the has_tag function in a conditional statement to achieve what you want. Take a look at the codex page here: Function Reference/has tag. This isn’t 100% tailored to your specific question, but you should see how it’s working and adjust for your specific task: <?php if( has_tag() ) { ?> <?php query_posts( … Read more

Customising a theme

The beautiful thing of WordPress (In my opinion) is that you can make almost any website and only have to make a theme and or plugin(s). You can change a theme, delete things, extend etc. Or you can make a child theme, leaving the original theme intact and overwriting default behavior in a different place. … Read more

Dynamically determine URI to scripts and styles included with a class which could be added from plugin/theme/child theme/mu plugin

For plugins it is: $plugin_url = plugin_dir_url( __FILE__ ); This works even if wp-content is on a separate domain. You may get problems if your class is in a subdirectory of the plugin – you should probably make the __FILE__ a parameter for a function: public function get_plugin_url( $base = __FILE__ ) { return plugin_dir_url( … Read more