Skip to main content

Next and Previous links for blog posts

How can I display Next and Previous links for blog posts where the links depend on the tag used to display the post?

Official response from

This is a bit outside of the scope of custom theme solutions that we can offer. I'm not quite sure if this is possible or not, but feel free to consult with our community of NationBuilder-certified Architects or post a question in the NationBuilder Facebook group.


UPDATE: Greg has developed a solution to this issue and was kind enough to share it with us so that we could update this post. Here is his solution:

In other words, Greg's site contains multiple "Basic" pages that display excerpts of all pages with a particular tag using the {% tag %} method. Each excerpt contains a link to the full page, but Greg has appended the parenttag parameter to the end of the URL there, so the page that lists all of their media releases has excerpts for each media release and each excerpt links to the pull page for that release, but the URL for the link has "?parenttag=media_release" appended to the end of it. He then placed the code above in the template for blog post pages in his website theme where he would like the "Previous post" and "Next post" buttons to go.

The end result is this: When you are viewing the list of Media Releases and click on one of the excerpts to read the full post, the "Next" button at the bottom of the page will take you to the next page tagged "media_release".

Thanks Greg!

Share this post

Showing 1 reaction

Please check your e-mail for a link to activate your account.