Add Blog Posts web part to Team Site page
Posted by zieglers on March 5, 2009
If you want to add posts web part to your team site – assuming that you have your blog site as subsite (named as “blog“) – you can do this as follows:
1. Create a doc library called Pages, default doc temlate is Web Part Page.
2. Create a page called Test.aspx.
3. Open Notepad, paste following web part code and save this code as Posts.webpart.
4. Change List ID for Posts list in blog site.
Find 43EBBD67-B3EB-4D9F-89C7-B84520A40991 and replace with your blog site’s posts list id.
5. Then, go to your team site web part galleries and upload this Posts.webpart.
6. Add this web part to your Test.aspx.
Now you should be seeing Posts from blog site.
P.S. Before writing this reply, I tested above steps one by one myself and it’s working.
Let me know if you encounter any problems.
zieglers



eyeguynm said
I downloaded your code, inserted the appropriate List ID from the “Post” list in my blog but I receive the following message: “Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Windows SharePoint Services-compatible HTML editor such as Microsoft Office SharePoint Designer. If the problem persists, contact your Web server administrator.”
Do you have any suggestions? I’ve triple checked the List ID…
Thanks!
Curt
matsonpp said
The reason you are getting this message is because this web part assumes your blog lives at the following EXACT location:
http://server/blog
In order to customize this web part to your site, you must modify the several instances of “/blog/” in the web part file.
Do a find and replace for /blog/ and replace it with the SERVER RELATIVE link to your blog site.
For example, my blog site is currently at:
http://server/sites/project1/blog/
Therefore, I will be replacing /blog/ with /sites/project1/blog/
Hope this helps.
Kind regards,
MatsonPP
tomjohnson1492 said
Can you tell me how I find the “List ID for Posts list in blog site.” I’m just not sure where to look. The Post list’s settings? Somewhere in SharePoint Designer? If you could give me more of a clue, that would help me out. Thanks,
Tom
matsonpp said
When you go into the settings for a list take a look in the address bar, you will see a query string parameter that is the ListID. Then just decode it using a site like this one: http://meyerweb.com/eric/tools/dencoder/
Regards,
Matt
tomjohnson1492 said
Thanks for the follow-up. However, when I add the webpart with the code you recommended, I get an error. Where did you get that webpart code?
mwchc said
I am trying to add a blog to a team site and am having trouble locating my blog’s site list id with the one in the post.webpart. Please help.
PB
m00nchester said
Great post! I got this working with no problems following your concise instructions.
One question though…
I need to remove the categories from the post. When I delete the categories the webpart errors (although the blog site remains fully functional). I assume the webpart code can be changed to accomodate this? If you could advise on the change I would be most grateful!
Thanks
Rob
traffic grab said
traffic grab review…
Add Blog Posts web part to Team Site page « Zieglers…
Coleen Schoelen said
I am so close to getting this to work!! I see the web part on the page and it’s showing the following line of info: Posted at by Schoelen, Coleen | Category: | Comments ()
But, I don’t see the blog, and it’s not populating any information in the above fields…
Any ideas what I am doing wrong?
myvideo downloader said
myvideo downloader…
[...]Add Blog Posts web part to Team Site page « Zieglers[...]…