Documentation » The “Syndication” Block

The “Syndication” Block

(Not to be confused with the Syndication Links plugin.)

The Syndication block is a “Theme” block. It shows so-called “syndication links,” links to “copies” of a post on social media or elsewhere.

The block currently supports links stored by the Share on Mastodon and Share on Pixelfed plugins. Other plugins’ syndication links can be added using the indieblocks_syndication_links filter:

add_filter( 'indieblocks_syndication_links', function( $urls, $post_id ) {
  // Maybe another plugin has stored a, for instance, Twitter URL.
  $twitter_url = get_post_meta( $post_id, '_share_on_twitter_url', true );

  if ( ! empty( $twitter_url ) ) {
    // Add it to the array.
    $urls['Twitter'] = $twitter_url;

  return $urls;
} );

The Syndication block is a “dynamic” block, rendered server-side. Consequently, changes to syndication links are reflected immediately.