Code snippet to block author pages

So you can remove the author-pages with an author.php file in your (child) theme, but what if you don’t want to touch the theme you ask? Well, I just added this code snippet to two of the sites I manage to stop user-enumeration (which can be done on any WordPress site by going to /index.php?author=1):

add_action('wp','no_author_page');
function no_author_page() {
  if (is_author()) {
    global $wp_query;
    $wp_query->set_404();
    status_header( 404 );
    get_template_part( 404 );
    exit();
  }
}

Disclaimer: the bulk of above code was shamelessly copy/ pasted from https://wordpress.stackexchange.com/a/27124

Smartphones, social media and children. Yes, it is that bad!

If you have children you should read this article, really!
A very small excerpt;

Even when a seismic event—a war, a technological leap, a free concert in the mud—plays an outsize role in shaping a group of young people, no single factor ever defines a generation. Parenting styles continue to change, as do school curricula and culture, and these things matter. But the twin rise of the smartphone and social media has caused an earthquake of a magnitude we’ve not seen in a very long time, if ever. There is compelling evidence that the devices we’ve placed in young people’s hands are having profound effects on their lives—and making them seriously unhappy.

So If you have children you should really read this article!

Loading webfonts just for a title? Switch to SVG instead.

So I wanted to replace a site’s (*) main title which required some fancy font (Courgette!) to be downloaded, by an SVG image.
Here’s what I did;

  1. make a screenshot of the node in Firefox Developer Tools -> Inspector -> select node -> click “screenshot node” in context menu
  2. convert the png-file into svg at http://pngtosvg.com/ result being a 6.93KB file.
  3. optimize the svg at http://petercollingridge.appspot.com/svg-optimiser resulting in a 3.1KB file (see above image) which remains crispy at whatever size.
  4. added the SVG as background image (not inline though, might do that next) and set “visibility” of the logo->a->h3 (which has the title in it as text) to “hidden”
  5. ticked Autoptimize’s “remove Google Fonts”-option (which also removed a slew of other unwanted requests for fonts)

(*) The site is my wife’s boeken-jagers.be which is an offspring of her successful “De Boekenjagers” Facebook group where people hide books for others to find (hunt) and share info about that. 27 000 members and counting, proud of my Veerleken!

Music from Our Tube; Cossi Anatz (seventies French Afro-Occitan Jazz)

As heard on an older Gilles Peterson WorldWide-show I listened to on the train this morning.

Cossi Anatz - Aden Arabie

About Cossi Anatz:

Comment ça va ? Cossi Annatz in french occitan means “How are you doing ?” I’m doing well when I listen to this beautiful free/spiritual jazz album recorded and produced by Michel Marre in the South of France and released on Vendémiaire (Jef Gilson’s label) with a similar style to Francois Tusques Intercommunal. Jazz Afro-occitan is written on the cover and it’s clearly the case when you put the needle on wax you instantly feel the North African, Arabic & Mediterranean influences, that are quite obvious here, especially in the brass & percussions. Some brilliant tracks like the beautiful deep jazz Al Coltrane or the monster spiritual oriental jazz Aden Arabie with great Fender solo.

(Source: http://www.diggersdigest.com/shop/product/jazz-afro-occitan-1/)