Shortcode, finally!

The most requested new feature of DaReactions is finally available: shortcode!

Many of you have asked us how to insert the reactions widget anywhere. Some have explicitly requested the implementation of a shortcode.

Here it is:

[reactions id="769"]

The above shortcode inserts the Reactions widget for the post with ID = 769 (the one you are reading right now), the result is something like this:

Loading spinner

You may add any widget from any post or other site content using the type attribute, for example the widget with reactions of knowledge base page would be like this:

[reactions id="49" type="page"]

In fact the type attribute may contains any string you want, so you’ll be able to add reactions for any entity you may think of:

[reactions id="1" type="something"]

This snippet will print a reactions widget for “something” with ID = 1, even if does not exist any content type called “something”.

Obviously, using the same couple type+id multiple times will load the same widget, so clicking one of them will update all the others.

Loading spinner

Loading spinner

The two widgets above have type=”something” and id=”1″

Loading spinner