This is not quite simple (as copying and pasting into new functions.php :D), but you can create a plugin that will load this every time.
A (very) good and simple guide can be found here.
Addition by Original Poster (johannes)
I created a plugin for that:
-
I created a simple php file and put it into
wp-content/plugins
. It looks basically like this (i.e. it contains the plugin name, description, author etc. and the function I want to use in my site across all themes):<?php /** * Plugin Name: Function-Includer * Plugin URI: my URI * Description: my description * Version: 1.0 * Author: johannes * Author URI: my URI */ [... code of my function ...] ?>
-
Then I went into the WP admin backend, to the plugin page, where that plugin is listed as “Function-Includer” and activated it.
-
Done – the function is available everywhere in my site now.