In this article I would like to share the steps to create post list in SharePoint team site. By default, post list is available in blog template site.
I got a requirement that a customer needs the post list in the SharePoint team site, but post list template is not available in SharePoint team site. There is a solution to create post list in SharePoint team site by activating the feature.
What is blog post list and why do we need post list?
- The blog post list is used to share the ideas and information to your organization
- Mainly blog post lists use Intranet portals
- We can comment the post and like/unlike the posts
- It can be created quickly and they often have an informal tone
Here is the code to activate the “Blog content” feature.
Add the below code in content editor webpart or script editor webpart.
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
- <script type="text/javascript">
- $(document).ready(function() {
- SP.SOD.executeFunc('sp.js', 'SP.ClientContext', LoadFeature);
- });
-
- function ActivateWebFeature(web) {
- var guid = new SP.Guid('{0d1c50f7-0309-431c-adfb-b777d5473a65}');
- var featureFef = web.get_features().add(guid, true, SP.FeatureDefinitionScope.farm);
- }
-
- function LoadFeature() {
- context = new SP.ClientContext("http://test.sharepoint.com");
- var web = context.get_web();
-
- ActivateWebFeature(web);
- context.load(web);
- context.executeQueryAsync(function() {
- console.log("Featured activated for Web: " + web.get_serverRelativeUrl());
- }, function(sender, args) {
- console.log('Error: ' + args.get_message() + '\n' + args.get_stackTrace());
- });
- }
- </script>
The list will be created on your team site, those lists are relevant to the blog feature.
Summary
In this article we have learned how to create a post list in SharePoint team site. Now you can enjoy the blog feature in team sites as well.