WordPress for Genealogy: Global Content Blocks for Reusable Blogging Prompt Intros

Blog Beat Introduction Example One
FIGURE 1: The standard intro text that I add to each post I write for the 52 Ancestors in 52 Weeks family history blogging challenge. The green arrows designate the unique pieces of content I modify for each week’s post.

I blogged recently about one of my favorite use cases for incorporating the WordPress Global Content Blocks plugin into my family history writing workflow — maintaining a library of reusable biographical profile boxes (what I call a Genealogy Snapshot Box) that I attach to each blog post about a particular ancestor or relative on my family history blog. In this post, I explain another favorite use case — maintaining a library of reusable Intro Blurbs for regular blog prompts, such as the 52 Ancestors in 52 Weeks blogging challenges in which I participated last year and am participating again this year.

Note that Global Content Blocks ONLY work on self-hosted WordPress.org-run sites. 

Reusable Content

Figures 1 and 2 show two of the most recent posts I have written for this year’s 52 Ancestors blogging challenge. Looking at these two posts, you can see that the Intro Blurb for both is almost identical. The only difference is the week number, the name of that week’s theme, and the ancestor number (which is always the same as the week number). This is true for all posts I have written in this blogging challenge series to date.

Blog Beat Introduction Example One
FIGURE 2: The standard intro text in another post that is part of this challenge. Here again the green arrows designate the unique pieces of content I modify for each week’s post.

Initially, when I started last year’s challenge, I manually copied and pasted the intro text blurb into each new post, then swapped in the details for the current week’s prompt. That method seemed inefficient, and often led to mistakes — usually me forgetting to alter the week number of the ancestor number. So I decided to take advantage of the ability to reuse a default standard block of text through use of the plugin.

If you are trying to avoid unnecessary plugins (which I normally do) due to load time performance or security issues, you can accomplish this same scenario using conditional statements in the functions file of your child them that hinge on particular categories or tags. But since I am already heavily using the Global Content Blocks plugin for pretty much every post on my family history blog, I opted to stick with the plugin route.

Global Content Blocks

How to use the plugin and integrate it into your blog posts or pages.

Installing the Plugin

Download the plugin for the WordPress Plugin Directory. Install and activate as usual. But, as you should already do with every plugin, make sure you backup your WordPress database and files prior to installation. If you utilize caching plugins, make sure you clear that cache after activating the plugin.

Accessing the Plugin

Once activated, you will access the Global Content Blocks plugin settings from the main Settings menu of your WordPress dashboard [Figure 2].

Global Content Blocks Admin Menu
FIGURE 3: Access your Global Content Blocks library from the main Settings menu.

Creating & Editing Blocks

From the Global Content Blocks settings, you can create a new content block or access your existing library of content blocks if you need to modify and update one.

The red arrow in Figure 4 shows you the “Add a New Content Block” button to click to create a new Intro Blurb block. This brings up a form with a WYSIWYG editor as show in Figure 6 (the Edit Content Block screen).

Global Content Blocks - Menu Top
FIGURE 4: The main Global Content Blocks menu, including a library of all existing blocks.
Global Content Blocks Library
FIGURE 5: A closer view of the 52 Ancestors (2015) Intro Blurb block in my block library.

Editing and updating an existing content block works the same way, except instead of clicking on the “Add a New Content Block” button, look in the block library for the item you want to modify. Click on the item name, and this will bring up the Edit Content Block screen [Figure 6].

The Intro Template Block

The following example [Figure 6] illustrates the Intro Blurb template that I use for my 52 Ancestors in 2015 posts.

Unlike my Snapshot Box example, I use the standard WYSIWYG editor formatting instead of raw HTML code. The green arrows designate which pieces of content get modified inside of each each individual blog post (not here in the actual content block).

Editing a Global Content Block
FIGURE 6: The template block of Intro text that I add to every 52 Ancestors blog post. The green arrows designate the unique pieces of content I modify for each week’s post.
Click image for larger view.

A quick look at the form fields in the Edit Content Block screen:

  • Name (Short Title): I use a brief descriptive title.
  • Custom Shortcode String: I leave this blank, and allow the system to generate a unique identifier shortcode.
  • Type: I leave this on “General” for general formatted text.
  • Description: I add a note, to expand upon the block’s purpose.
  • Content: This is the formatted intro text.

With this Intro Blurb template saved in the Global Content Blocks library, I am ready to add it to all new post in the series. If you already started blogging a particular series, you can still go back in and add this type of Intro Blurb content block to those posts as well.

Using the Intro Template Block

From within the Edit view of the blog post to which you want to add the Intro Blurb, move your cursor to the beginning of the post. Look for the Global Content Blocks button in your WYSIWYG editor [Figure 7]. It looks like three multicolored blocks stacked together.

This year’s 52 Ancestors in 52 Weeks blogging challenge focuses on a different theme (as well as a different ancestor) each week, so I usually save the theme prompt for each week in the draft of that week’s post [Figure 7] as placeholder content until I add the Intro Blurb block.

Adding a Global Content Block to Edit Post View
FIGURE 7: Place your cursor at the beginning of the blog post, then click on the plugin icon.

Select the Block

Clicking on that Global Content Blocks button brings up a Global Content Blocks dialog box [Figure 8]. Since you already have your code block created in the Global Content Blocks library, you choose the first option, to “Insert Global Content Block”.

Note that you can actually create the new code block from this screen. I just always find it easier to create it first in the Global Content Blocks library, and insert it from this screen.

Adding a Global Content Block to Post
FIGURE 8: From the Global Content Box dialog box, click on the “Select a content block” option.

Once you click on the “Select a content block” drop-down menu, the dialog will display a list of your existing Global Content Blocks [Figure 9]. These are displayed in the order in which you created them, with the most recent at the bottom — not in alphabetical order. Click on the block you want to use. Your browser Find function can help with this.

Selecting a Global Content Block
FIGURE 9: From the Global Content Block library, choose the Intro Blurb block you want to use in your post.

The block name you selected should now be displayed in that “Insert Global Content Block” field [Figure 10]. If the correct name is not displayed, repeat the preceding steps.

Copy the Block Content

For the Intro Blurb, check the box that says “Insert full content” [Figure 10]. This is the opposite of the process we followed for the Snapshot Boxes use case, in which we left that check box blank. The reason we add the actual full content (vs. just inserting the content block shortcode) is that for each Intro Blurb, we want to create a one-off instance of the content block template for each post in which it is used. For the Snapshot Boxes, we wanted to insert the entire code and text block as-is, without making any modifications unique to just a particular post.

Now on the flip side, since we are orphaning each instance of the Intro Blurb for each applicable blog post, if you opt to change the Intro Blurb text down the road (or notice a misspelling), you will have to manually update the Intro Blurb text on every single post in which you already added it. Unlike the Snapshot Box example, making the change to the master content block will NOT automatically push that update out to every single post in which it is used.

Copy Global Content Block Versus Insert
FIGURE 10: Confirm that the Global Content Blocks dialog box is displaying the Intro Blurb block you want to use. Then check the “Insert full content” box, before also clicking on the “Insert Content Block” button.

After checking the “Insert full content” box, click on the “Insert Content Block” button to drop your copied content into the blog post. This takes you back to the normal blog post or page edit screen. Here you will see the contents of the Intro Blurb template [Figure 11]. This is different from what we experienced with the Snapshot Box use case, where we ended up here with just an icon representing the Global Content Block instead of actual text [Figure 12].

View of a Copied Global Content Block
FIGURE 11: You should now see the copied template content displayed in your blog post. The green arrows designate the unique pieces of content I will modify for this week’s post.
Click image for larger view.
Post Edit - Global Content Block Added
FIGURE 12: At the same step in the process on the Snapshot Box example, from the prior blog series. Note that a shortcode icon gets copied into the blog post editor instead of actual content like we see in Figure 11 above.

Finish the Post

Now it’s time to add in the pieces of Intro Blurb content that are unique to this new blog post — those bits of one-off content that are different from the standard repeating Intro Blurb template we imported from the Global Content Block. I add in the ancestor number, the week number, and the ancestor/relative’s name (Figures 11 and 13, note the green arrows). And remember that week-specific theme placeholder content I mentioned earlier (Figures 7 and 11, highlighted in orange)? I simply cut and paste that into the Intro Prompt text as well [Figure 13].

Completed Global Content Block Template
FIGURE 13: Here the green arrows designate the pieces of original content that I have swapped into the Intro Blurb copied from my template block. Click image for larger view.

Save your draft as normal, then finish composing the rest of your post (Figure 14).

Blog Beat Introduction Example One
FIGURE 14: A final look at the Intro Blurb for a particular weekly post.

Other Examples

Can you think of other ideas for which you might want to utilize Global Content Blocks for regular blogging prompts or columns? How about:

  • For the standard intro text to a regular post on your society’s blog profiling a particular member or volunteer each month?
  • For the standard intro text to each post you are live-blogging covering a conference?
  • For a standard list of 3-4 “Want to Learn More?” resource links listed at the bottom of each blog post about a specific topic?

Leave a Comment, Question, or Suggestion

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top