Shared functions.php across WordPress multi-sites

Ever wondered how you could use a shared functions.php in a WordPress multisite (WPMU) environment? If you are using a WordPress multisite setup you’ve probably come across using the same custom WordPress functions over and over again. As a theme developer, you might already have created a functions.php blueprint that you will use in every new theme. In this article, I will show you how to set up and implement a shared functions.php that you are be able to use across a WordPress multisite installation.

« Read more about: Shared functions.php across WordPress multi-sites  »

Make your WordPress gallery link to a custom image size

Using the WordPress gallery shortcode and linking the gallery items to its media source, WordPress will always create a link to the full size image. For a project I needed to change this behaviour since the full size images uploaded by editors will usually be too large to be dealt with the way we want to.

We will be using galleries linking to large size images and displaying them in a fancybox.

« Read more about: Make your WordPress gallery link to a custom image size  »

Magento & WordPress Multisite: a challenging marriage

For the relaunch of a project’s website, we chose to use two CMSes: Magento for managing products and being able to actually sell products online and WordPress for good old content such as news around products and company, information about the products’ designers and other similar stuff. But we were also having “satellite sites” / microsites around specific products or brands that were managed in different content management systems on different servers. This made publishing content to those different websites challenging and confusing for the editors as well as maintaining the sites for me as developer.

« Read more about: Magento & WordPress Multisite: a challenging marriage  »

Bash script to copy remote MySQL databases

Image attribution: "lnav - log monitor" by Linux Screenshots via flickr. License: CC BY 2.0, no changes made to the origin image

I am glad that I have set up multiple environments for a current project that I’m working on. The live site, a testing site, and two developing sites – all with their unique databases just in case something’s going very Murphy – are a fair deal to develop and test new features and bugfixes on any web project. But there’s one major drawback: Keeping data “in sync”. Version control like git or SVN do a great job with all that PHPs,

« Read more about: Bash script to copy remote MySQL databases  »

Enable PHP error-logging on an A2 Hosting shared web hosting account

I tried to re-install my favourite running tracking application and failed, I just wouldn’t stop getting Internal Server Error 500. I quickly figured that I would have to look into the error logs to actually see what is going wrong. But that’s not activated by default, so I had to enable PHP error-logging manually.

Of course, I thought that the Internal Server Error 500 might be caused by some errerous entry in the .htaccess-files. 

« Read more about: Enable PHP error-logging on an A2 Hosting shared web hosting account  »

Magento development environments with different database connections

After explaining, how to use Different database connections in WordPress development environments, I’m going to show, how to set up Magento development environments with different database connections. Magento works a little different here, since it has its database connection in an XML file rather than a configuration .php-file.

« Read more about: Magento development environments with different database connections  »

Content snippet in blog posts with a shortcode

You’re having the same content snippet on multiple WordPress blog posts and are fed up with making changes to that small piece on each single post? I’m showing you how to create a custom WordPress shortcode that pulls the content from a single post and injects it right into your blog posts.

The situation

I used an ad managing plugin for displaying the same content in multiple articles. Basically, those are a series of blog posts that had a table of contents.

« Read more about: Content snippet in blog posts with a shortcode  »

Different database connections in WordPress development environments

Since I am using version control with GIT, I have set up different environments for my current WordPress/Magento-married project. For this project, I did not want to continue “cowboy coding”, so I set up a remote staging / testing / development site and multiple local development sites. Each site has its own purpose and needs its own MySQL database. So I had to handle different database connections in my WordPress installations. Well, I could work with only one DB,

« Read more about: Different database connections in WordPress development environments  »

Setting up a BitBucket git repo with A2 Hosting

Recently, I moved this website to A2 Hosting. Since I am using git at the office intensely for developing the company’s website, i felt like I’d have to continue using git for my home-story blog, too.

When I was a little more new to git, I chose Bitbucket as the service to host my repo. There I can have unlimited private repos with up to four more users and “sync”

« Read more about: Setting up a BitBucket git repo with A2 Hosting  »

How to get your Garmin Connect RSS feed

Since this might be helpful for a wider audience of Garmin Connect Users having trouble getting their proper activity RSS feed, I decided to write yet another blog post. So if you are reading this, you might have wondered: Why is the provided Garmin Connect RSS not working? Well, to make a long story short: They screwed it. And over at Garmin, they did not bother to work on that problem for almost 3 years now!

« Read more about: How to get your Garmin Connect RSS feed  »