Implement Content Blocks Post Type (with Shortcode) in WP

Implement Content Blocks Post Type (with Shortcode) in WP

WordPress is the best CMS that provides thousands of free themes and millions of free plugins that can be used to get the desired functionality added in your blog. For example, there may be a need to add some useful marketing material or a message along with some hyperlinks to third-party websites in some selected posts. How you will do this? Will you add this manually by editing every post one by one or will you make changes in the coding? Or, will you be taking help of a plugin? This post gives you answer to all these questions with an effective and easy solution.

Implement Content Blocks Post Type (with Shortcode) in WP

How to Implement Content Blocks Post Type (with Shortcode) in WP

Suppose you are an affiliate marketer who wants to add some useful affiliate links at the end of some selected articles so that when the user reaches up to the end, he/she reads that marketing content, clicks the affiliate hyperlink, and moves on to the affiliate website so that you have some chances of making money online. This can be done in following two ways:

Method #1 – Manual way

This is the most time consuming and tiresome process. In this process, you open each post that needs the same content, edit the post, add the content, and save the post. If this has to be done one time, it is okay and there is no need for any other method but when you make changes in the content that has to be repeated in every selected post, what’s then? At that time, again you have to follow the same process, which will consume a lot of time. Moreover, you have to be very careful so that you do not leave any of the required post unattended.

Method #2 – Using Content Blocks Post Type (with Shortcode) in WP

You can avoid editing every post that carries the repeated content if you use Content Blocks Post type with shortcode. With the use of Content Blocks Post Type, you create a content block, get its shortcode, and place that shortcode in every post/page where you want to repeat the same content. And, when you need to change the content, just edit the content block and all its instances (that are placed in several posts/pages with shortcode) will be automatically updated.

How to Use Content Blocks Post Type with shortcodes?

There are two methods of getting this done. First, you hire a WordPress expert who will create the related .php files with the required Custom Blog Post Type function. And Second way is to simply use a Free Plugin named Custom Post Widget. Best part of this plugin is it is easy to install and use. It uses WYSIWUG editor so that you can easily format the content the way you want it to be. You can also insert images, hyperlinks, etc.

In this post, we will show you how to use Custom Post Widget plugin to create and use Content Blocks Post Type. Link to Plugin https://wordpress.org/plugins/custom-post-widget/screenshots/

Downloading, installing, and activating the Custom Post Widget plugin

1. Login to your wordpress admin panel.
2. In the left-navigation menu, select Plugins > Add new.
3. In the search field, type Custom Post Widget and click the search button.
4. You will see the plugin in the search list. Install plugin.
5. Once installed, click the Activate Link

How to use the Custom Post Widget Plugin to create Content Blocks

1. In the left-navigation bar, select Content Blocks > Add Content Block.
2. Give a name to this content block.
3. Add content you want to repeat in different posts / pages.
4. Once done publish it.

How to Add Custom Blocks in Posts?

After you have created the required Custom Blocks Post Type using this Custom Post Widget plugin, perform the below steps to add the same custom blocks in posts:

1. In the left-navigation bar, select Posts > All Posts.
2. Find and edit the post in which you want to add custom blocks.
3. Click on the location in the Post editor where you want to display the Content Block.
4. On the WYSIWUG editor, you will see a new tab named Add Content Block.
5. Click the Add Content Block A pop-up appears.
6. In this pop-up select the content block, which you want to display.
7. Click the Insert Content Block
8. When you click the Insert Content Block button, a shortcode will be added in your post.
9. Copy this shortcode and paste it in a notepad because this will be required to add this content block in all posts/pages/widgets where you want it to appear.
10. Now, publish the post.
11. Edit all posts/pages or configure widgets one by one and add the shortcode that we have asked you to copy and paste in the notepad.

This is how to add Custom Blocks Post type (with shortcode) in WP. Now, if you need to change the hyperlink or need to add a logo, just make changes in the Content Block and it will be automatically reflected everywhere its shortcode is used.

Access this link to see the tutorial for implement content blocks post type.

Leave a Reply

Your email address will not be published. Required fields are marked *

About US | Terms and Conditions of Use | Privacy Policy | Affiliate disclosure
All original content on these pages is fingerprinted and certified by Digiprove