Europese Unie en hun WordPress blogs

De Europese Unie is blijkbaar niet erg up to date.. Ze gebruiken voor hun blogs een verouderde versie van WordPress, namelijk versie 2.9.1, terwijl op dit moment (van schrijven) versie 3.5.2 de nieuwste versie is. Blijkbaar is up to date zijn niet zo belangrijk..

How to change WordPress default Email From Name and From Address

WordPress sends by default an email from wordpress@domainname.com with WordPress as sender name. This can be adjusted easily via a filter. Change the From Address The filter will change the From address from wordpress@ to the value you specify. function new_mail_from( $from_email ) { $from_email = ‘myownemail@domainname.com’; return $from_email; } add_filter( ‘wp_mail_from’, ‘new_mail_from’ ); Change …

WordPress MP6 registers Google fonts apart from my theme

My theme (customized theme Esplanade on www.maartenvandekamp.nl) uses Google fonts. These fonts are registered and enqueued the right way in functions.php. The new (secret!) plugin MP6 also uses Google fonts, but does not check if a user is logged in, so these fonts are always enqueued when a post of page is viewed, even when I’m …

Improved code – Show related posts in WordPress without a plugin

A while ago I posted an article about showing related posts in WordPress without the use of a plugin. Recently I have found better code for this and I would like to share it with you <?php $tag_ids = wp_get_post_tags( $post->ID, array( ‘fields’ => ‘ids’ ) ); $args = array( ‘tag__in’ => $tag_ids, ‘post__not_in’ => …

WordPress Archive Page with Transients

I recently discovered transients, a caching method that you can use to save queries in the database or object cache (if used). It can save a lot of time to gather the information for a page to load and it can descrease the amount of load on your database / PHP. I use two files …

WordPress Bookmarks list with description

I saw this piece of code in a file from a theme and I wanted to share it with you. It’s a very nice piece of code that shows all the links per category, with description. So good, you don’t even have to change it any more. Here’s the code: <?php $args = array( ‘title_li’ => false, ‘title_before’ => ‘<h2>’, ‘title_after’ => ‘</h2>’, ‘category_before’ => false, …

Nieuwe website De Lunterse Beek

Vandaag is de nieuwe website voor De Lunterse Beek gelanceerd. Ik heb hier aan mogen meewerken en de website is erg mooi geworden! De website is vandaag ‘overhandigd’ aan de eigenaar van De Lunterse Beek.

Show related posts in WordPress without a plugin

There are plugins that provide you with the ability to show related posts below a post. But it’s possible to do this without using plugins. This code uses tags attached to posts to show 5 related posts in a list. <?php $tags = wp_get_post_tags($post->ID); if ($tags) { $tag_ids = array(); foreach($tags as $individual_tag) $tag_ids[] = …