A little while ago, I reviewed Custom Post Widget, which allows you to add small…
When building sites, you occasionally need to create small blocks of content that can be distributed to various places around your site. Rather then have to copy and paste this content over and over again, you can use Custom Post Widget to create independent chunks of content and place them anywhere on your site.
What’s It Do?
Content Post Widget creates a new custom post type “Content Blocks,” where you can create small (or large) chunks of content, independent from any post or page on your site. Then, using either a widget or a shortcode, you can place this piece of content anywhere on your site. This is useful if you, for instance, have a block of legal text you need to place on multiple posts, pages and sidebars in your site, or if you have a set of social media buttons you want easy access to. When you update the content in your individual content blocks, it will automatically update everywhere that content is displayed, so all of your duplicate data will stay in sync.
How’s It Work?
After you install and activate the plugin, the first thing to do is actually create your first content block. To do so, go to the newly created section in the WordPress admin, and click on Content Blocks -> Add New Content Block. You will be directed to a fairly basic WordPress editor for you to add content.
Add a title to your content block, then add in any content in the main post editor box. Any content you can add to a WordPress post or page can also be added to a content block, including links, images, videos, audio and formatting. You can also add a featured image here. Add any chunk of content that you think may need to be repeated multiple times across your site. On the right sidebar, you will see a metabox for “Content Block Information.” You can add a short description of your content block. This won’t actually be output anywhere on your site, but is useful when navigating your blocks.
Once you’ve created a content block, the next step is to actually distribute it across your site. There are two ways you can add a content block to your WordPress site, through a widget, or with a shortcode.
To add a content block to a widget, go to Appearance -> Widgets. Drag the “Content Block” widget into the sidebar you want to output too. From the “Content Block to Display:” dropdown menu select the title of the content block you created. There is also a checkbox to “Show Post Title” or “Show Featured Image.” If you want to output the title as a header, check the former, if you want to show your featured image just below the title, check the latter. There is also a checkbox for “Do not apply content filters.” Chances are, you won’t have to use this. But if your content is not being added properly, then you may want to try checking this box. After you have set up the widget, save the sidebar, and you will see the content block appear.
You can also content blocks to your site using a shortcode:
Replacing “1111” with the ID of your content block. The plugin makes it even easier by adding a “Add Content Block” button at the top of your post editor, right next to the “Add Media” button. Click on this, then select the content block you want to output from the drop-down menu and insert it into your post. This will automatically generate the proper shortcode for you.
Costs, Caveats, Etc.
The uses for Custom Post Widget aren’t incredibly far reaching but there is more then a few times when this can certainly come in handy. It has undergone frequent updates since it’s release, and I’m sure it will only get better as time goes on. If you are having problems with the plugin you can view a screencast on the plugin’s homepage, or contact the plugin developer directly before heading over to the support forums.