The “Put_Content_Here” shortcode

Some themes include text blocks that aren't stored as pages or posts, but as special content stored with the theme itself. We often see these for special parts of a theme, like the footer, or permanent homepage content blocks, or widgets along the side of the page.

Since this content doesn't originate from pages or posts the Wunderbar can't work with these directly. But that's why we've included a shortcode called “put_content_here”.

With this, you don't have to work with the theme's special  containers – instead you insert a [put_content_here] shortcode in the special content block so that you can display it – and edit it with the Wunderbar.

You only have to edit the special content blocks one time. (They are usually found through customizing your theme.) Remove any existing content and replace it with the shortcode:

[put_content_here name=nameofcontent]

Replace nameofcontent with the name of the content  (sometimes also called the “slug”). You decide on whatever name makes sense. It might be “company_overview” or “footer”. The content doesn't have to exist at this point. Save your template changes.

When you return to the page where the custom content was, you should  see the Wonderbar crosshairs. You can click and start editing.

The [put_content_here] shortcode will usually work in Text Widgets. [put_content_here] also works inside any regular post or page on your site – you can have one post include another. We can't promise this will work in all locations. If, instead of seeing the crosshair, you see the shortcode itself, then your theme or template doesn't support this feature.

The [put_content_here] shortcode actually can have four parameters – although it doesn't need any.

name: if not used, the content will be given an internal name that matches the parent post. If present, whatever you enter will be assigned to the content instead. The same name can be used on multiple posts, and the same content will appear! this is handy for boilerplate or other common and reused content.
There is a third option, which is to start or end you content name with punctuation like a dash, underscore, or plus sign. This will APPEND or PREPEND your name to the parent name and save the Wunderbar content under the combination.

If you had a page with the slug “about” using [put_content_here] will create a content block that is saved as “about_wbcontent.”
[put_content_here name="disclaimer"] would let you use a content block named “disclaimer”, no matter what its surrounding content is called. [put_content_here name="disclaimer"] on any other page will display the same content.
A shortcake (or Gutenberg block) like this: [put_content_here name="-address"] when used on our “ABOUT” page would create a content area called “about-address”. Used on a different page (let's imagine one called “northeast”, [put_content_here name="-address"] would create different content block named “northeast-address”.

Beginning or ending with a punctuation mark can be handy if you create a page then duplicate it as a sort of template. You will end up with new ages with their own uniquely-named blocks, ready to be filled in.

user:  allows you to restrict the editing this piece of content to a specific user.

role: allows you to designate a group of users who share a common role to be editors

placeholder: This is the text that will be displayed when no content has yet been written. “PUT CONTENT HERE” is the default.