PHPackages                             automattic/liveblog - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. automattic/liveblog

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

automattic/liveblog
===================

Liveblogging done right. Using WordPress.

1.11.0(3mo ago)3142124[9 issues](https://github.com/Automattic/liveblog/issues)[11 PRs](https://github.com/Automattic/liveblog/pulls)GPL-2.0-or-laterPHPPHP &gt;=7.4CI passing

Since Jun 12Pushed 1mo ago132 watchersCompare

[ Source](https://github.com/Automattic/liveblog)[ Packagist](https://packagist.org/packages/automattic/liveblog)[ Docs](https://github.com/Automattic/liveblog/)[ RSS](/packages/automattic-liveblog/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (48)Used By (0)

Liveblog
========

[](#liveblog)

- Contributors: [automattic](http://profiles.wordpress.org/automattic), [nbachiyski](http://profiles.wordpress.org/nbachiyski), [batmoo](http://profiles.wordpress.org/batmoo), [johnjamesjacoby](http://profiles.wordpress.org/johnjamesjacoby), [philipjohn](http://profiles.wordpress.org/philipjohn)
- Tags: liveblog
- Requires at least: 6.4
- Requires PHP: 5.6
- Tested up to: 4.9.8
- Stable tag: 1.11.0
- License: GPLv2 or later
- License URI:

[![Build Status](https://camo.githubusercontent.com/384cff3fa1795613bebe97765956479b755909697a234a285174b7bc96474bd1/68747470733a2f2f7472617669732d63692e6f72672f4175746f6d61747469632f6c697665626c6f672e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Automattic/liveblog)

Empowers website owners to provide rich and engaging live event coverage to a large, distributed audience.

Description
-----------

[](#description)

Your readers want your updates as quickly as possible, and we think we provide the easiest and the most flexible publishing environment to make that happen. Sometimes though, that’s just not enough.

When you’re covering a fast-paced event — the latest Apple unveiling, an F1 Grand Prix, or the Super Bowl — a full blog post for each individual update is a poor experience for your authors and your audience.

The [WordPress.com VIP Liveblog Add-On](http://vip.wordpress.com/liveblog-add-on/) was purpose-built to address these issues specifically.

Here’s what makes it special:

- Post updates right from the front-end of your site (no need to use the `/wp-admin` dashboard)
- Viewers of your Liveblog get new entries served to them instantly and automatically, without needing to refresh their browser.
- Your authors can drag-and-drop photos right into the Liveblog area, without needing to navigate to separate browser tabs or windows.
- There’s no need for a separate site dedicated to liveblogging: *every* post can be a liveblog, even existing ones.

If you'd like to check out the code and contribute, [join us on github](https://github.com/Automattic/liveblog), pull requests are more than welcome.

Installation
------------

[](#installation)

1. Upload the `liveblog` folder to your plugins directory (e.g. `/wp-content/plugins/`)
2. Activate the plugin through the 'Plugins' menu in WordPress
3. You can enable the liveblog on any post's edit page

### Overview

[](#overview)

The entry system supports `#hashtags`, `/commands`, `@authors` and `:emoji:` with an autocomplete system to help speed up the process. These extensions are filtered on save, for example a hashtag `#football` would be saved as `football` allowing easy styling. The container of the entry will also receive the same class `term-football`.

The command system has one inbuilt command:

`/key`: Which defines an entry to a key event, it adds the meta key to entry `liveblog_key_entry`. A key event can be styled using the `.type-key` class.

To display a key event box you can add the `[liveblog_key_events]` shortcode in your theme, e.g. in the sidebar, or you can use the Liveblog Key Events widget. Entries used with the key command will be inserted to both this box and the main feed. It also acts an anchor system to jump to parts of the main feed. It's not necessary to include the shortcode for the /key command to be enabled.

An example of using the key command would be an author writing the following in the New Entry box:

```
New iPad announced, launching next week — more info to come. /key

```

You can add new commands easily with a filter, the most basic command will add a class to entry, so you could do a simple `/highlight` which would add `type-highlight` to the entry container, letting you style the background color:

```
add_filter( 'liveblog_active_commands', 'add_highlight_command', 10 );

function add_highlight_command( $commands ) {
  $commands[] = highlight;
  return $commands;
}
```

A command can have both a filter called before the entry is saved, or an action that is called after it’s saved:

```
apply_filter( "liveblog_command_{$command}_before", $arg );
do_action( "liveblog_command_{$command}_after", $arg );
```

#### Customizing Key Events Shortcode

[](#customizing-key-events-shortcode)

As mentioned earlier you can add the key events section by using `[liveblog_key_events]`. If you wish to change the title from the default `Key Events` then you can add a title attribute:

```
[liveblog_key_events title="My New Title"]
```

If want to remove the title, good example when placing the shortcode in a widget.

```
[liveblog_key_events title="false"]
```

A key event entry can be altered in to two ways:

**Template:** This is how each entry will be rendered. There are two inbuilt templates: list and timeline, or you can add your own using a filter:

```
add_filter( 'liveblog_key_templates', 'add_template' );

function add_template( $templates ) {
  $templates['custom'] = array( 'key-events.php', 'div', 'liveblog-key-custom-css-class' );
  return $templates;
}
```

There's a few things to note here:

- `key-events.php` points to `liveblog` folder in the current active theme directory, in this case we our loading template file `liveblog/key-events.php`.
- `div` is where we set the element type that wraps all entries, in the case where you wanted to build a list, you would set this to `ul`.
- `liveblog-key-custom-css-class` is a class that will be added to the wrapper element of the entry to help with styling, in this case it would look like: `...`

An example of a template file is:

```
