The Blog Posts macro allows you to display blog posts on a Confluence page. Clicking on a title takes you to the blog post.

Using the Blog Posts Macro

To add the Blog Posts macro to a page:

In the Confluence editor, choose Insert > Other Macros

Find and select the required macro

Speeding up macro entry with autocomplete: Type { and the beginning of the macro name, to see a list of suggested macros. Details are in Using Autocomplete.

To edit an existing macro: Click the macro placeholder and choose Edit. A macro dialog window will open, where you can edit the parameters of the macro.

Parameters

Parameters are options that you can set to control the content or format of the macro output. Where the parameter name used in Confluence storage format or wikimarkup is different to the label used in the macro browser, it will be listed below in brackets (example).

Parameter

Required

Default

Description

Content Type to Display

(content)

No

titles

Available values:

titles — Display only the title of each blog post.

excerpts — Display a short excerpt from each blog post. If the post contains an Excerpt macro, the Blog Posts macro will display the content defined in the Excerpt macro. If the post does not contain an Excerpt macro, the Blog Posts macro will display the first few sentences of the post.

entire - Display the whole content of each blog post.

Time Frame(time)

No

no limit

Specify how far back in time Confluence should look for the blog posts to be displayed.

Available values:

m — Minutes

h — Hours, so '12h' displays blog posts created in the last twelve hours.

d — Days, so '7d' displays blog posts created in the last seven days.

w — Weeks

Restrict to these Labels(label)

No

None

Filter the results by label. The macro will display only the blog posts which are tagged with the label(s) you specify here.

You can specify one or more label values, separated by a comma or a space.

To exclude content which matches a given label, put a minus sign (-) immediately in front of that label value. For example: If you specify a label value of -badpage you will get only content which is not labelled with 'badpage'.

To indicate that the results must match a given label value, put a plus sign (+) immediately in front of that label value. For example: If you specify a label value of +superpage,+goodpage you will get only content which has at least two labels, being 'superpage' and 'goodpage'.

Restrict to theseAuthors(author)

No

None

Filter the results by author. The macro will display only the blog posts which are written by the author(s) you specify here.

Restrict to these Spaces(spaces)

No

@self, i.e. the space which contains the page on which the macro is coded

This parameter allows you to filter content by space. The macro will display only the pages which belong to the space(s) you specify here.

You can specify one or more space keys, separated by a comma or a space.

To exclude content in a specific space, put a minus sign (-) immediately in front of that space key. For example: If you specify a space key of -BADSPACE you will get only content which is not in the BADSPACE.

To indicate that the results must come from a specific space, put a plus sign (+) immediately in front of that space key. For example: If you specify a space key of +GOODSPACE you will get only content in GOODSPACE. (Note that this is not particularly useful, because each content item belongs to one space only. If you put a plus sign next to one space key and list other space keys too, the other space keys will be ignored.)

When specifying a personal space, remember to use the tilde (~) sign in front of the username, such as ~jbloggs or ~jbloggs@example.com.

Maximum Number of Blog Posts(max)

No

15

Specify the maximum number of results to be displayed. Note that the results are sorted first, and then the maximum parameter is applied.

Sort By(sort)

No

creation

Specify how the results should be sorted. If this parameter is not specified, the sort order defaults to descending order (newest first) based on the creation date.

Values:

title — Sort alphabetically by title.

creation — Sort by the date on which the content was added.

modified — Sort by the date on which the content was last updated.

Reverse Sort(reverse)

No

false

Select to change the sort from descending to ascending order (oldest first). Use this parameter in conjunction with the Sort By parameter. This parameter is ignored if the Sort By parameter is not specified.

In storage format and wikimarkup a value of true changes the sort order.

Code examples

The following examples are provided for advanced users who want to edit the underlying markup for a Confluence page.

Macro name:blog-posts

Macro body: None.

Storage format example

Wiki markup example

No labels

191 Comments

I noticed that the HTML for the Title column's heading specifies width="70%" (Confluence 2.3). This is not appropriate when the Author and Date posted column values are about the same length as the title. Web browsers are perfectly good at table layout so I don't see the point of this.

It's over-caching - we've noticed the same sort of thing and so have our clients, eg:

add a new post and it doesn't show up for an hour or so

delete a post and it's still shown

When the cache eventually clears down, it obviously shows the correct information, but while that cache is in place people get confused because the blog-posts macro is not accurately reflecting the actual blog posts.

Can you describe the process of clearing the cache? Do you mean by flushing cache through the Administration > Cache Statistics page? If yes, which one of caches listed on the page sholud be flushed? What are the impacts on performance in case of flushing?

I have found this to be an indexing issue, not a cache issue. I tried flushing everything in the cache through the Admin Console to no avail. What I later found was that the new blog posts were sitting in an unprocessed content indexing queue for the past 2 hrs. This queue is found by clicking the Content Indexing Link under Administration. there were all my blog posts and some other items. By clicking the "Flush Queue" link at the bottom, everything was normal again. This queue is supposed to be processed every minute, but for some reason it's not processing that often ( it had been over 2 hrs). I still haven't figured out why, but at least I can give my users more immediate satisfaction.

I think the reason for this random behavior is that blog-post posts news in order of last edited... so if I edit a post of yesterday (to correct a minor error) it appears in the beggining of the list...

With 2.6.0 a lot of stuff has been moved into a jar file. Open WEB-INF\lib\confluence-2.6.0.jar (jar is simply a zip file). You should find templates\macros\lastblogs.vm in there. If you leave the .jar file as-is but extract the one file to WEB-INF\classes\templates\macros\lastblogs.vm and make your edits it to it there it should override the copy in the jar when you restart Confluence.

Anonymous

I am attempting to use the blog post macro to create a filtered view of posts by specific users. This way it will allow for 'departmental' blog views within our shared space. The parameters shown allow for inclusion based on space name, or by a users personal space, but not by posts in the group space by a specific user. (or hopefully, by multiple usernames). Is there any way to filter the blog post macro by the username that created the post in the Spaces blog, not the individual's blog?

Sorry to say that Confluence does not provide this feature currently and I cannot think of any workaround that can be used to fulfill your request. However, you may want to raise an improvement request in the following:

Anonymous

I am currently using Confluence 2.5.5. I would consider myself a fairly 'novice' user of confluence - and I am having trouble with the blog-posts macro.

If I use {blog-posts:labels=label_name|match-labels=all} the macro works fine, but the moment I change it to {blog-posts:content=titles:labels=label_name|match-labels=all} the labels and the match-labels filters do not seem to work, and it brings up all the blog posts. What may I be doing wrong? I need to display just a list of post titles based on labels alone.

I was able to get my desired results by using the content_reporter macro. However, I'd appreciate if someone can provide me an update as to why the blog-posts macro was showing the behavior as I expressed.

I believe there must be typo within the blog-posts declaration. I used both the samples you have listed above and true enough that the latter with the content titles displayed all blogs. Perhaps you should be using the following instead:

Anonymous

I am having the same problem. All blog posts appear unfiltered when the macro can't find an instance of the label I have assigned- ie. if the label is "foo", and there aren't any blog posts with that label, all blog posts will appear even though they don't have that label.

The code I am using:

{blog-posts:content=titles|labels=foo|}

As soon as I add a blog post with that label, the filter works.

I have no idea how to fix this - Help anyone? I am using confluence 2.8.1

Is there any way to create a tabbed (deck and cards) space with different blogs for different tabs? For example, I'm trying to create a newsletter page with four cards, and I'd like three of the cards to have a news blog format. Unfortunately, the same posts are showing up on all three cards.

Anonymous

We are having issues getting the match-labels=all option to work as expected. Has anyone seen this behavior?

For example I expected {blog-posts:time=30d|labels=label1,label2|match-labels=all} to output all news items modified in the last 30 days that have both label1 and label2 attached to them. If some had additional labels they would be included as long as they had both of the specified labels. It seems to work fine unless no entries match at least one of the labels. In that case it appears to include all entries that match one of the specified labels. In the case listed above if no News items match label2, but there are ones that match label1 then you appear to get all the entries that match label1 that meet the other criteria. If a single entry has label2, then the behavior appears to go back to expected and outputs "No news found" with no special formatting. Interestingly enough the message for the single label case with match-labels=all turned on is different and output "No content is labeled with label1" with a red background.

I guess one workaround is to add additional news items with the missing label until the issue is fixed.

Anonymous

2.7.3. I had found that bug report later, but I wasn't certain if we needed Confluence 2.8 or would version 1.4 of the Confluence Advanced Macros fix it. The admins haven't installed 1.4 yet so I don't have the answer yet.

Anonymous

What is the difference between http://developer.atlassian.com and http://jira.atlassian.com, I submitted a report at jira.atlassian.com for the blog-posts macro and it doesn't appear to have been reviewed, but there is definitely work going on with the blog-posts macro in the JIRA database at developer.atlassian.com. Is one system better than the other for submitting issues with the blog-posts macro?

The http://jira.atlassian.com is the issue tracker for improvement request, bug report, feature request and task for Atlassian product. If you happen to have any Confluence related technical issues, please feel free to raise a support ticket via our issue tracker at http://support.atlassian.com

Anonymous

Could you please further explain the goal you want to achieve here? It will be great if you can provide a scenario for a better understanding. Alternatively, you can raise a support ticket at https://support.atlassian.com for more queries.

Anonymous

Hi,

is there any way to collect news (blog-posts) on a certain page and inform useres by E-Mail, that there is new news? What I try to realise is, that the news is brought to the user and not that he has to look after it . . .

Is there a way to "back-date" news items. Our group provides a lot of presentation across our organization. Previously, we have organized these presentations in a simple table. I would like to try to place those older presnetation items as news items based on the date given and then limit the blog-posts macro so that we don't see the last 50 presos... only the last 5 or so?

I am not sure which criteria that you want to use for your filter. But, there are other choices such as filter by spaces or combine parameters to filter as in example no.7 above. Apart from that, you might want to use the {search} macro to filter the results by content and use the lastmodified parameter to control the freshness of the contents. Refer here for more information about the {search} macro. Hope that helps!

I need to divide the news across pages. That is, there will be open forum where all news will be reposited by help of blog-posts and other forum will be the filter of some forums which are presently in open forum.
For that there is Label. But i don't want to use Label.
Thanks & Regards,

As far as I can understand, it sounds like that there is a need for forum-like feature in Confluence. If that is what you are looking for, there is a good discussion on this issue at Confluence as a Forum. Feel free to browse for more information.

Anonymous

As per my understanding, the second choice, Community Bubbles plugin is not compatible with your Confluence version. Hence, you might want to try out the other options.

If possible, consider your instance for an upgrade to the latest version available as more bug fixes and features are included. As you may already know, support for Confluence 2.2.x and 2.3.x has been discontinued.

I have tried to sort the blog news in title order, but I do not get the list sorted. It does not actually matter in which order I try to sort the lines. Did anyone have the same problem? We are working in Confluence 2.9.

Anonymous

Hi,

I want to list blog items from all personal spaces vs global spaces, but I also need to exclude blog items with a specific label. Following instructions, I tried this (note the minus sign in front of the label):

{blog-posts:max=10|labels=-foo|content=titles|spaces=@personal}

But I'm still getting blog items labeled "foo". I'm on Confluence 2.8.2. What am I missing?

Is there any chance to see this feature implemented? Currently this macro it's not acting like a real blog because if I shows only 5 posts, I have no way to directly access to previous posts. I have to click on a post and then I have two arrows... Why you do not add paginations?

I saw there is another plugin (Flexi Blog Plugin) that implements many of the requests for the shipped blog macro but I really I do not understand Atlassian policy about development. Why I should get my Confluence instance bloated from thirdy party plugins to see corrections and improvements on shipped plugins?

I found a similar request on Jiira but it seems three years old and on the road map there no improvement on this plugin so I see no utility to raise further requests.

Again, a lot of people asks for reducing title font size since three years ago. Why was not implemented? It's seems a really trivial correction. Yes I see I could change it through css and other ways but would my modifications be retained when I upgrade Confluence?

Things are clear here: the blog macro is useless even for a simple blog and to get basic functionalities as a simple pagination I need another plugin (unsupported) and for a decent title font size I need to tweak Confluence.

The steps that Ming Giet mentioned were for the news tab in the space that you can access from Browse > News.

However, I think your query is related to the {blog-posts} macro. In order to achieve your requirement, you have to edit the vm file responsible for the blog-posts macro. There is no direct way of doing it. Here are the steps if you are really keen to achieve this:

Unzip the <confluence-install>/WEB-INF/classes/com/atlassian/confluence/setup/atlassian-bundled-plugins.zip

Unjar the confluence-advanced-macros-X.X.X.X.jar in the unzipped atlassian-bundled-plugins.zip

Once unjarred, edit the /com/atlassian/confluence/plugins/macros/advanced/blog-posts.vm file.

Comment the following lines in the file by adding #* and *#:

Once you have done this, save the file.

Jar the file back to confluence-advanced-macros-X.X.X.X.jar

Zip the atlassian-bundled-plugins.zip back

Restart your confluence.

Your changes would be reflected after this

If you need a guide to help with the editing files within JAR archives, you can refer to this documentation. However, please keep in mind that the confluence advanced macro is a part of bundled plugins. Hence they are stored in a special place, which is located at <confluence-install>/classes/com/atlassian/confluence/setup/atlassian-bundled-plugins.zip. Therefore, if you are following the guide, please make sure the paths are correct.

As a precaution, you might want to backup your atlassian-bundled-plugins.zip before changing anything. Hope this will help you.

As far as I know, there is no direct way of doing it. However, you can probably do the following:

Unzip the <confluence-install>/WEB-INF/classes/com/atlassian/confluence/setup/atlassian-bundled-plugins.zip

Unjar the confluence-advanced-macros-X.X.X.X.jar in the unzipped atlassian-bundled-plugins.zip

Once unjarred, edit the /com/atlassian/confluence/plugins/macros/advanced/blog-posts-titles.vm file.

Remove the following two lines in the file:

Once you have done this, save the file.

Jar the file back to confluence-advanced-macros-X.X.X.X.jar

Zip the atlassian-bundled-plugins.zip back

Restart your confluence.

Your changes would be reflected after this

If you need a guide to help with the editing files within JAR archives, you can refer to this documentation. However, please keep in mind that the confluence advanced macro is a part of bundled plugins. Hence they are stored in a special place, which is located at <confluence-install>/classes/com/atlassian/confluence/setup/atlassian-bundled-plugins.zip. Therefore, if you are following the guide, please make sure the paths are correct.

As a precaution, you might want to backup your atlassian-bundled-plugins.zip before changing anything. Hope this will help you.

Basically it is the same as the above suggestion. In order to remove the whole header row, kindly follow the following steps:

Unzip the <confluence-install>/WEB-INF/classes/com/atlassian/confluence/setup/atlassian-bundled-plugins.zip

Unjar the confluence-advanced-macros-X.X.X.X.jar in the unzipped atlassian-bundled-plugins.zip

Once unjarred, edit the /com/atlassian/confluence/plugins/macros/advanced/blog-posts-titles.vm file.

Remove the following lines in the file:

Once you have done this, save the file.

Jar the file back to confluence-advanced-macros-X.X.X.X.jar

Zip the atlassian-bundled-plugins.zip back

Restart your confluence.

Your changes would be reflected after this

If you need a guide to help with the editing files within JAR archives, you can refer to this documentation. However, please keep in mind that the confluence advanced macro is a part of bundled plugins. Thus, they are stored in a different location, which is at <confluence-install>/classes/com/atlassian/confluence/setup/atlassian-bundled-plugins.zip. Therefore, if you are following the guide, please make sure the paths are correct.

You also might want to keep a backup of your atlassian-bundled-plugins.zip before doing any changes. Hope this helps.

Thank you - that's really great and much cleaner. Is it equally easy to tell the layout of this macro to ONLY wrap the title content, and not the author and date? This macro works very well, but becomes less effective when all three columns break...

Yes, it is equally easy to wrap only the title content. In the blog-posts-titles.vm file that you have edited previously, just add the style for nowrap for the particular column. The following code will only wrap the title content:

Anonymous

In the documentation which describes how to unjar, there is a note providing a shortcut. It says you can drop the modified file in a particular path without recreating the JAR as long as you get the full path correct.

Is this shortcut applicable to mods to the blog-posts.vm file? Or is it different because the JAR is contained within atlassian-bundled-plugins.zip

The documentation supports the author field, but no examples cite its usage. I tried using spaces (instead of commas) with no success as well as removing the parameter name "author=" from the macro (and just inserting the values after the macro name). It works when I specify a SINGLE user. An alternatively acceptable solution would be if it would accept a group, which it does not.

I didn't believe you could set the posting date for news items for dates in the future, has this functionality changed recently?

On your first point, when I looked at it before the blog-posts macro wasn't to flexible on display options. The Reporting Plugin is the option we used, but I believe there is another option from Customware called the Flexi Blog Posts Plugin.

We really like this macro, but would like to find a way that the icon shown to the left of each item (currently a default system news icon) could be a custom icon, derived from the space that the news is from (presumably the space logo). We have a main intranet-like page that pulls news from throughout our wiki, but it's not obvious enough which news items are from which spaces. Is this something we can modify the macro to do?

Hi Michael,
This is possible by including the {blog-posts} macro in Site Welcome Message. You can bring up Confluence Admin page > General Configuration > Click 'Edit' button > Customize the Site Welcome Message. For example, to display news from my personal space where the space key is CON, I would use {blog-posts:space=CON}. After that just save it and view the effect from Dashboard.

Anonymous

Is it possible to schedule a blog post in Confluence 3.0.1? We see the post date selection when creating a news article, but we aren't able to select a date beyond the current day of the post (dates after the current date are greyed out). I don't see the calendar view in news postings in Confluence 3.0.1, and we'd like to be able to create news and post at a later date. Thanks.

I am afraid that this is not currently possible. However, I have found a similar feature request. Please add yourself as a watcher, vote for this feature and add your own comments to this feature request. For further details on how we include new features and improvements, you might want to read this page

Anonymous

We're using Confluence 2.7.1 and haven't experienced this issue. Posts from 2010 seem to appear just fine. We are using BloggingRPC plugin version 1.2.2 (wasn't sure if this was related to the blog-posts macro or not).

Unfortunately, this is not possible unless you modify the source code of the Confluence Advanced Macros. The class that you will need to modify is com.atlassian.confluence.plugins.macros.advanced.BlogPostsMacro. If you need assistance, feel free to ask in Atlassian Answers.

No, there is no such a feature yet. If you are keen on it, feel free to raise a feature request in our issue tracker. On a side note, you might be interested in a similar macro, the Flexi Blog Posts Plugin.

Cant get -BADSPACE to work, it seems that default is the current space and it is not possible to combine this parameter with the @all-parameter. Please correct me if my test went wrong!

So you have to specify every single space, e.g. you have 200 spaces and all but 2 (e.g. test and private) are interesting for news. Thats just one scenario which seems to be a blocker for the usage of this macro. Actually i just wanted to have some simple lists, but it seems i have to install the reporting plugin or modify another/this plugin for that.

Please add your comments to the discussion, vote on it and add yourself as a watcher for future updates. Also, please bear in mind the following document on how we schedule features for inclusion in our products: Implementation of New Features and Improvements.

Anonymous

Hi,

We experienced an issue with the excepts parameters. One of our users used column tags in the blog post and and since one of these was within the first 400 chars it really messed up the blog post page.

Maybe you should consider stripping such input in the excerpt characters.

By default blog-posts macro is not displaying authors picture, can somebody help achieving this. I have seen in most of the places picture is being displayed with blog entry, even in the top of this article "what you type" and "what you will get" image of Matt is displayed but i am not able to show picture. Is there any parameter i have to use, as of now i have modified the blog-posts.vm to achieve this

This improvement has been introduced in Confluence 3.3. Specifically, this is introduced in Advanced Macros plugin version 1.9, which is not compatible with Confluence 3.2.x. You might want to consider upgrading your Confluence to enjoy this feature.

Anonymous

I have the opposite question. Our company just upgraded to 3.5 and now my picture is all over a project team space because I happen to be the one who posts public status updates. I don't want this. It's a *team* site, not my personal one. So how can I suppress the pictures?

Anonymous

Hi,

I'm using the blog-post macro with the content:titles option. In FireFox it looks fine, however in IE and Chrome, each blog posts seems to have a bullet point at the end or begining. Any idea's why this might be happening?

Anonymous

Anonymous

Has anyone run into problems in the last few days where the time constraints aren't working? I had it set for only showing posts in the last week and it was working perfectly fine until a few days ago when it started to show the last month or so. I didn't change any of the coding for the macro.

Is see that the issue I want to address is displayed three posts up, that is, when I use the blog-posts macro and specify that it should display posts with a certain label (and no posts with that label has been added), Confluence displays the text "blog-posts:'label" is not an existing label" in a sort of pinkish colour. I would have expected Confluence to display the text "No blog posts found." instead. Am I missing something in the usage of the macro?

Anonymous

According to the table above, the default for Content Type to Display is entire - which I interpret to mean the complete blog contents will be included, but it looks like the default is really title. Is there some way to include the complete contents of a set blog posts based on a set of labels?

Also if I have multiple labels that I want to show, it seems that all of them must be present before anything is shown - I'd like to be able to define the set of labels and treat them as ANY semantics, is there anyway to do this?

the default for the parameter should be "entire" and was "entire" up through Confluence 3.5.13. This functionality was either broken or removed in Confluence 4.0 and it is filed a critical bug: CONF-23273

I've updated that issue to reflect that the Confluence 4.0 documentation no longer shows "entire" as the default. It now links to the previous version of this documentation which shows the originally intended functionality.

There are multiple customers commenting on CONF-23273 who are impacted by this bug. Please take the time to vote for this bug so that Atlassian might choose to fix it.

Anonymous

The table above mentions the ability to set the Content Type for the Blog Post macro. In Confluence 4.0 I no longer see a field in the Edit Macro popup for Content Type. Is there a way to edit the parameters of the Blog Post Macro manually?

Anonymous

Any update on this? My old blog macros still display excerpts and if I copy the macro from one page to another I can get them. But if I edit the macro it immediately changes back to the default titles.

Anonymous

Hello,

we just updated our Confluence 3.5 to Version 4 and have no problems with the "blog-posts"-macro using the space "@all". All "old" blog-posts (made with version 3.5) are displayed using this space-identifier, but not the newest blogposts made with version 4.

Anonymous

Anonymous

Perhaps this is causing my problem: I want blog posts to sort with newest post at top. This worked in our previous version of Confluence, but now it is somewhat broken. It seems to be top posting by date, but then ordering by creation time. If multiple blog posts are made in the same day, you get this...

Anonymous

There seems to be a bug with blog posts in "Advanced Macros 2.0.34". After upgrading to this plugin version today the macro displays the full blog even if I choose "titles" as content type. All other content types working correctly.

After viewing the blog content in storage format I noticed that the parameter "content" does not exists if I choose "titles" als content type.

Same here - blog posts macro (Content Type: titles) was displaying fine until I modified the macro properties. now when I select 'title' for Content type, it displays the full blog post. even deleting and adding macro again gives same problem

I'm a space admin, so I only have control over my spaces and not confluence-wide. I'm trying to alter the size of the Blog heading that I'm using the blog post macro to display on my wiki's homepage. From the above there are several references to style-sheet modifications, but they seem to have to be applied at a higher level than space admin. Is there a way for me to customize this font size with my permission level or do I have to go up the chain? If the latter, will a change there effect other wikis, or just my own?

In Confluence 4.1.7, I've noticed that the blog-posts macro with the excerpts option doesn't preserve the formatting of the original blog post. This seems like a regression from the behavior I was used to in Confluence 3.5, where an excerpt preserved the formatting of the blog posts.

Is this an issue that anyone is aware of? If so, has it been addressed in a later version? I didn't see anything like this in the resolved issues lists for later releases.

Anonymous

It would be helpful in the doc, to indicate the specific parameter or provide an example of all parameters being used. We had to guess at how to actually use them (e.g. use time instead of time frame, use content instead of display content, contentdisplay, etc.)

Has anyone found a way to create a similar table format as the old wiki markup?

A workaround could be: Edit Page => Insert => Wiki Markup

Then insert the following markup:

{blog-posts:content=titles}

We prefer this rendering much better as it consumers much less space that is currently being taken up just by the title. We are an OnDemand user and don't have access to make css modifications or user macros and really want to be able to post blog entries on the dashboard, in the announcements section.

Hi if you wrap the section you want to display in an excerpt macro, everything works as expected. The one thing i miss is an indication if the entire post wasn't shown, so we manually type in a link to the entire post)

Anonymous

We prefer this rendering much better as it consumers much less space that is currently being taken up just by the title. We are an OnDemand user and don't have access to make css modifications or user macros and really want to be able to post blog entries on the dashboard, in the announcements section.