Placing a content block

Insert the Traffman block with Gutenberg, the site editor or a shortcode, and customize its appearance.

The block is your site's half of the exchange: every display of it and every click on it earns the points your own content spends on other members' sites. Why that matters and what happens behind it is explained in what the content block does; this page is about putting it on a WordPress site.

Inside a post or a page

When editing a post, a page or a custom post type in the block editor, look for the "Traffman Content" block. Insert it wherever you like and a short piece of other members' content will be displayed there.

The block comes with its own panel in the editor sidebar. Settings holds the Top label – a heading rendered above the borrowed content – and the standard Advanced section for extra CSS classes. Styles covers the appearance: text and background colour, font size and line height, and the padding and margin of the block.

Anywhere in the theme

The block is not limited to the body of a post. Appearance → Editor opens the site editor, where the same Traffman Content block can be added to any template or template part – the blog index, the single-post template, a sidebar, the footer. It carries the same Settings and Styles panels there.

Placed in a template, the block appears on every page rendered through it, so a single insertion covers the whole archive or all posts at once, with nothing to add to the individual posts.

Classic editor (shortcodes)

If you use the classic editor or need the block inside a PHP template, use the [traffman-content] shortcode. All three of its attributes are optional: top-label sets a heading above the block, style takes inline CSS, and class takes CSS classes.

[traffman-content top-label="It could be useful for you:" style="color: #2c3338;" class="test"]

Classic widgets

Themes that still have widget areas get one more way in: Appearance → Widgets offers Traffman Content (legacy widget). It takes the same three settings as the shortcode – Top label, HTML class and HTML style – and renders the same block.

Up to four blocks per page

A page can hold at most four blocks, and all of them count, wherever they come from – the post body, a template, a widget area, the footer.

So before adding a block to a template, count how many already appear on the pages it renders.

Checking the result

Open the page as a visitor would. If the block is empty, check three things: that the Service status on the Common tab of the plugin settings is Enabled, that the Healthcheck tab reports a working connection, and that your site actually offers content to the network. The client itself has to be verified as well – see registering your first client.

If you only want to see how the block sits on the page while the site is not ready to join the exchange yet, switch Service status to Demo: the block fills with demo content, nothing is exchanged for real and points do not move – see installing the plugin.

  • English
  • Polski
  • Русский
  • Українська