Get Studiopress Genesis Theme working with POSSE Webmentions

The POSSE (Publish (on your) Own Site, Syndicate Elsewhere) espouses the idea that all content should be owned by you. The content lives on your own site and then is broadcast to all the other content silos on the internet (i.e., Twitter, Facebook, Instagram).

The technology that allows Wordpress to support this is handled through the IndieWeb plugins. One of these plugins allows activity in silos on syndicated posts to be put back onto your website. What this means is if I post a status message on my Wordpress blog, Twitter displays it, someone replies on Twitter, than that reply is displayed on my website.

How I do this is through a third party service called Brid.gy. You can read about that if you want to set it up.

When I got everything running I noticed that I was seeing activity on my posts but they were not displaying on my site. I use Studiopress Genesis + Mindstream themes. I did some digging and figured out the problem.

Two quick changes to the main Genesis theme will fix displaying a webmention on my site:

The first in the function genesis_do_comments()

if ( have_comments() && (! empty( $wp_query->comments_by_type['comment']  ) 
    or ! empty ($wp_query->comments_by_type['webmention'] ) ) ) {

The second in genesis_default_list_comments:

function genesis_default_list_comments() {

    $defaults = array(
        'type'        => 'comment',
        'avatar_size' => 48,
        'format'      => 'html5', //* Not necessary, but a good example
        'callback'    => genesis_html5() ? 'genesis_html5_comment_callback' : 'genesis_comment_callback',
    );

    $args = apply_filters( 'genesis_comment_list_args', $defaults );

    wp_list_comments( $args );

$webmentions = array(
        'type'        => 'webmention',
        'avatar_size' => 48,
        'format'      => 'html5', //* Not necessary, but a good example
        'callback'    => genesis_html5() ? 'genesis_html5_comment_callback' : 'genesis_comment_callback',
    );
    wp_list_comments( $webmentions );

}

This is not a perfect solution. Everytime Studiopress updates their themes I’ll have to reply this change. It also doesn’t allow you to interleave mentions and comments in time order. As you can see, it displays comments first them webmentions.

Joe Cotellese @JoeCotellese