Disable self pings on a multisite

On a project, the client wanted to disable any pingsbacks from it’s own site. I found a snippet for that and there is also a plugin with this snippet. But this will only work for the current page. What if you want to disable pingbacks from one site of a multisite to another?

The extended snippet

Everytime a post or page is posted or updated, WordPress will try to send a pingback to any URL in the content. To modify the list of links to ping, we can use the action pre_ping with a very simple callback function:

Weiterlesen →

WordCamp Torino – My second Italian WordCamp

I just got back from my second WordCamp this year and also the second in Italy: WordCamp Torino. At WordCamp London three weeks ago, I was pretty sure, that I would not attend this one. But only a week later, plans changed and I couldn’t resist 🙂

Friday: Contributor Day

With only buying my ticket two weeks before the event, the Contributor Day tickets were already gone. Thanks to the organizing team, they could find some more room for us, so I was able to attend. With the upcoming WordCamp Europe and my participation in the organizing team, I had some work to do on the new default WordCamp theme. I hope that I can present you the results soon. There was also a little workshop about VVV which was pretty useful, as I just set up the new environment for my work on the new theme.

Weiterlesen →

My third WordCamp London and the first time as a volunteer

Last weekend, around 600 people met to largest the anually WordCamp in a European city: WordCamp London 2017. This was the third year in a row I visited this event and it still is my most favorite WordCamp. I booked my ticket many weeks ago. But after the organizing needed some last minute volunteers around a month before the big event, I didn’t thought twice and applied as a volunteer.

My second WordCamp volunteering

I have visitied many WordCamps, spoken on a couple of them and co-organized 3 Camp so far in Berlin and am currently the lead organizer of the next WordCamp Berlin in May. But this was only the second time, I applied as a volunteer. Being a volunteer, you not only meet new people and get in touch with many more, than as a regular attendee. You also learn a lot as an organizer. There are many things every WordCamp has in common. But especially WordCamp London sets a good example on many details. The team around Jenny Wong did a great job. Just as in the years before.

Weiterlesen →

Implementing a datepicker fallback for HTML5 date input fields

In one of my advent calender post, I show you, how you can set a range for the date input type (not yet translated). In a comment, someone reminded me, that this new input type is not yet supported by Firefox. It might be available in future version (currently it can be enabled by setting a flag in Firefox 56+), but until then, we should implement a fallback.

Checking for browser support

I still like the native date input fields a lot better than the JavaScript based datepickers, especially on mobile devices. To check if a browser supports those new input fields, you can use a very simple check:

Weiterlesen →

Direct downloads with the „download“ attribute

You probably all know that situation. You have some files on your website and you want to enable your users to easily download these files. This task is pretty easy and you might wonder, why I am writing a blog post about this. Well, not every user knows how to do it easily and you might want to make it as easy as possible for those inexperienced users, to download the files.

The default behavior for links to files

So how do you usually link to files a user should be able to download? You probably just use a simple link like in this example:

<a href="http://example.com/image.jpg">Download image</a>

Weiterlesen →

Mark affiliate links in your content using CSS

As a German blogger, there are some things you should be aware of. One of them is the „Gesetz gegen den unlauteren Wettbewerb“ (law against unfair business practices). If you run a business and you think, that someone is taking advantage by not following some rules, you might be able to sue them. Even if you only have a „personal blog“, chances are very high, that it’s not totally „private“. Some bloggers don’t want to have advertisements on their blog, but they participate in some affiliate programs and „just“ place some links. But this is considered advertisement as well and must therefore be marked as such.

Disclaimer

As I am not a lawyer, the text of this blog post may not be completely legally founded. Therefore, this blog post will only give you a technical solution, which might not be enough legally. If you have any doubts, please consult a lawyer, you can verify your specific situation.

Weiterlesen →

  • Veröffentlicht in: Misc

Set a default message for the Jetpack Publicize module

Many of you probably share their new blog post on social media platform like Facebook, Google+, Twitter and others. I also do that, but I always post them manually with a nice custom message. But sometimes you need to have a more automated way to post to those platforms. Especially when you publish a lot of content and/or you are sharing on many platforms. Then you might want to use one of the many automatic sharing plugins around.

Social media postings with the Jetpack Publicize module

On a client’s website, we’ve used Jetpack for the sharing. Once you’ve activated the Publicize module and connected to some services, you will with a new setting in the „Publish“ metabox. Clicking the „Edit Details“ link, you will see a new textarea, where you can set the custom message to be used when shared. It looks like this:

Weiterlesen →

Redirect the main site of a WordPress multisite network

Before I start with my first „Project 52“ blog post, I want to apologize to all my English readers for not being version active. If you don’t know German, you didn’t have too much to read on my blog in the past. It was acutaly only one real post in the last 4 years (and three posts with slides from my WordCamp talks) only. But this is going to change now!

For those of you who can read German, you might have read my advent calendar in 2015, followed by #projekt52 (a blog post every week of the year) and another advent calendar in 2016. As I was very unhappy with the fact, that I haven’t blogged in English too much, I’ve made a decision: I will blog every two weeks in English and on every other week, I’ll translate this blog post into German, starting today!

A multisite with no main site

This week, I finished the migration of a large client project into a new multisite installation. This multisite had the goal to have one sub-site per customer of our client. Every multisite needs a main top level domain. For this example, let’s say the name of the domain was abc-customers.com. The multisite was set up to use subdomains, while working on the draft of a new customer sub-site. So, we would have something like somecustomer.abc-customers.com and anothercustomer.abc-customers.com. Once the sites where ready to go live, the sub-site were switched to a domain or subdomain (e.g. abc.somecustomer.com and anothercustomer-platform.com). I was using the core WordPress functionality to map those domains and no additional domain mapping plugin.

Weiterlesen →

WordCamp Bilbao 2016 – A WordCamp not like many others

The last two days I attended the first WordCamp in Bilbao, Spain. It was not at all the first WordCamp outside of Germany for me but I still experienced some differences. The first thing was, that I attended only two Sessions. Or at least only two I understood. Because all the other sessions were given in Spanish or Basque, which I both don’t speak 🙂 And that brings me to the first thing I liked about this WordCamp.

A WordCamp truly for the local community

The idea of WordCamps started as something local. We tend to forget this as we attend big ones like WordCamp in London with 600+ and the WordCamp Europe this year with 2200+ attendees. So they are usually very international and it is pretty common that people travel to those WordCamps from all over Europe (or even worldwide).

I had the WordCamp in Bilbao on my list because I wanted to visit a very good friend in this town, while also attending the WordCamp. So as soon as they announced the date, which was not even two months before the WordCamp, I asked if there will be any English talks. Ibon Azkoitia, the lead organizer, reached out to me on Slack and told me that they were planning to have 80% local speakers and 20% foreign. And with „local“ they really meant local speakers, so from Bilbao and around. And this also meant some talks in Basque, the local language, which is just a Spanish dialect but a very own language with no connection to any other language.

He then asked me to give him the title of the talk I was planning to give 🙂 I really didn’t mean to give a talk, I just wanted to visit the WordCamp as well as the city and my friend. But he asked so nicely, how could I have say no? 😉

Weiterlesen →

Slides from my session „Better Themes with Scalable Vector Graphics (SVG)“ at WordCamp Nuremberg 2016

My first WordCamp talk this year about a topic I personally find really important. I hope that you have all learned something new. At least the bit about CSS filters 🙂

Better Themes with SVG

I also added an „Online Image Map Generator“ service to the sources, that looks quite nice. For the Color-Matrix CSS filters, I couldn’t find an easy generator.

UPDATE 11.06.2016: I’ve also givin this talk at WordCamp Bilbao. My slightly modfied slides can also be here: Better Themes with SVG – WordCamp Bilbao 2016.