Create Reusable Content Blocks For Your WordPress Site

If you ever find yourself adding the same text or code to your WordPress posts on a regular basis, and you want a way to make that process more efficient, then today’s article is just for you.

Depending on your site, you might have stock content that you often add to your posts and pages. This could include pieces of text, such as an introduction, or a disclaimer notice. Perhaps its images, buttons, links, or certain formatting you often apply to text. It might even be a sign up form for your newsletter.

Whatever the content is that you find yourself repeating on a regular basis, there is a great feature of WordPress which can save you a lot of time and effort, while also helping you to become more productive by creating reusable blocks of content. In this post you will learn how to create those reusable blocks of content using a handy free plugin.

How to Create Reusable Blocks of Content

Before we get to the tool that can help you create a piece of content once, and then add it to multiple posts and pages at the touch of a button, let’s just take a quick look at the technology behind this great timesaver.

The Power of Shortcodes

Shortcode Example

Hopefully you are aware of the power of shortcodes in WordPress, and are familiar with plugins like Symple Shortcodes. If you haven’t yet been introduced to the wonders of shortcodes, they are essentially words in square brackets, or short codes, which when added to a post, are replaced with a larger piece of text or code when the post is published.

What are WordPress Shortcodes Used For?

This text or code could be anything of your choosing, from a sentence or link that you reuse often in your posts, or some formatting you would like to apply to a piece of text, or even images, buttons, videos, or anything that can be displayed in a WordPress post.

Perhaps the best thing about shortcodes is that if you then edit the content that the shortcode is inserting into your posts, every instance of that shortcode on your site will now display the updated content. This can save you countless hours, preventing you from going through all your existing content and having to make changes to each post individually.

While there are many plugins that add a whole library of pre-built shortcodes to your WordPress site, wouldn’t it be great if there was a way to easily create your own shortcodes that contain the content that is unique to your needs?

Enter Global Content Blocks

Global Content Blocks is a tried and tested free plugin that makes it very easy to create your own pieces of reusable content which can be inserted into your posts, pages, widgets, or theme files, simply by entering a shortcode.

How to Create Your First Shortcode

Shortcodes Install Plugin

Once you’ve installed the plugin on your WordPress site by searching for Global Content Blocks from the Add New Plugin page, there will be a new item added to the Settings menu titled Global Content Blocks.

From the Global Content Blocks page within your site, click on the Add New Content Block to create your first piece of reusable content. In this example I will create a sentence that I want to add to the end of some of the posts I write that encourages readers to leave a comment.

Shortcodes Add New Content Block 01

In the first four fields enter the text to describe your content block and choose the type of content you will be adding to the block from the available options:

  • General
  • AdSense
  • Code
  • Form
  • HTML
  • iFrame
  • Opt-in Form
  • PHP Code

As you can see you can enter pretty much any type of content into these reusable blocks, you can even enter the shortcodes for other reusable blocks if you are feeling adventurous. Once you’ve setup the content block, it’s time to create the content.

Shortcodes Add New Content Block 02

As you can see you conveniently get access to the WordPress visual editor so you can format the content, or even add an image that will all be inserted into your posts and pages. Once you are happy with your content you can save it. However, don’t worry about getting it perfect just yet as you can go back and edit any of your content blocks at a later date.

Shortcodes Add New Content Block 03

After saving the content block, it will be added to the list of other blocks you’ve created. These blocks can then be edited or deleted from your site if necessary. You will also notice that each block has two shortcodes. In my example they are:

  • [ contentblock id=1 ]
  • [ contentblock id=comment-text ]

Both shortcodes are linked to the same piece of content, and when adding a shortcode to your posts, the content in the block will be displayed when the post is published.

Inserting the Content Blocks

So although you can type in the shortcodes if you know the ID, this plugin includes another handy feature. If you create a new post or open an existing one for editing, you will notice there is a new button on the post editor.

Shortcodes New Icon

By clicking this icon you can quickly choose the desired content block from the dropdown list and add the content to the post.

Shortcodes Insert Shortcode

When adding the content block to your post, you have two options:

  • Insert the shortcode
  • Insert full content

By default the plugin will add the shortcode, and when the post is published or previewed, the content in the block will be displayed. The second option – insert full content – will insert the content from the block straight into your post editor without using a shortcode. This is useful if you want to make a one-time edit to the content in the block, before using it in your post.

The benefit of the first option, and inserting a shortcode, is that should you need to make changes to that content block in the future, you can edit the content block once, and then each time that shortcode has been used, that content will be updated to reflect the changes you’ve made. This will save you editing all the individual pages that contain that piece of content, and making the changes one by one. By previewing the post, you can see the contents of the content block displayed in your post.

Get Global Content Blocks

Conclusion

Hopefully you can see many situations where this plugin can save you a lot of time and effort. As almost any content can be added to a content block, and the blocks can be added to almost any part of your site – including widgets and theme templates – you can get really creative with this powerful feature of WordPress. To view some advanced usage examples visit the plugin documentation page.

What content can turn into a reusable content block to save yourself time and effort?

Post Author: Joe Fylan

Joe loves trying out the latest themes and plugins and sharing how they can help WordPress users improve their websites, and in turn offer more value to their visitors. If you want to work with Joe to make your WordPress project a success get in touch via his website.

Disclosure: This page contains external affiliate links that may result in us receiving a comission if you choose to purchase said product. The opinions on this page are our own. We do not receive payment for positive reviews.
Got something to say? Join the discussion.
  1. Chad Warner says:
    Thanks for the great article. I hadn't heard of Global Content Blocks before. For Intense WordPress Site Builder, we have a similar concept but we call the reusable content "Snippets." I know that Parallelus has built in similar functionality into their themes. Maybe this same concept will eventually be built into WordPress itself. If someone was looking for a fairly basic free alternative to Intense, it looks like Global Content Blocks and Symple Shortcodes would be a good start.
    • Joe Fylan says:
      Thanks Chad. It would be great if something like this was built into WordPress, or at least given a more universal name that would help others find out about the ability to insert content like this. There are a number of other plugins that do a similar job but I choose Global Content Blocks as it lets you insert the actual contents of the block if you want, as opposed to only using a shortcode, despite the fact that the UI could do with an update. Your site builder looks interesting, it must be useful to be able to preview the shortcodes before inserting them. Joe
      Author
  2. Many thanks for the clear review. I noticed your comments that the UI could do with an update. Would be grateful for any suggestions on how this could be approved? Re the name, it was taken from a similar (but more basic), core feature of CMS Made Simple of the same name which was one thing I missed when I migrated to WP several years ago but yes, in retrospect it may not be the most obvious name for the plugin. Thanks again, Ben
    • Joe Fylan says:
      Hi Ben, I think switching to the native WordPress UI would help make it a bit more user friendly. If you look at a plugin like Buckets which does a similar job, they have got the UI down pretty nicely. Re the name, I didn't mean specifically the name of your plugin, just that a people seem to use different terminology for this type of feature. Such as snippets, shortcodes, blocks, buckets, etc. Thanks, Joe
      Author
  3. Blue Lotus Works says:
    We've used Global Content Blocks on occasion, but generally prefer using Post Snippets (https://wordpress.org/plugins/post-snippets/), particularly when snippets require variable entry. The Post Snippets dialog box provides fields for the variables. And, the TinyMCE button is available in Visual and HTML modes.
  4. What happened? Global Content Blocks is MIA at the WP's plugin directory. I loved that plugin.
  5. Tony States says:
    Bummer this article is of no use to anyone now.... (Global Content Blocks) is no longer available..... lame......

Leave a Reply