Skip to main content

Pulling content from one page to another with tags

Oops :) that was supposed to say "Pulling content from one page to another page

I *know* this is rather simple. I've been using partial templates a lot in my sites, but for some reason, I can't figure this one out. I want page excerpts from all pages with a certain tag to appear on another (basic) page- just like when you click on a page tag and it gives you all the pages that have that tag all on one page. These aren't blog posts, but a mix of petitions, donation, and events. Any help would be greatly appreciated!!

Official response from

Hey Alison, those pages that display all posts with a specific tag are populated by the "tags_show.html" template, which contains this forloop:

{% for post in tag.most_recent_published_pages %}
{% include "page_excerpt" with post %}
<hr />
{% endfor %}

The original loop is looking for posts specifically - if you change "for post in..." to "for page in...", it will bring pull in page excerpts from all pagetypes and not just blog posts.

Share this post

Showing 5 reactions

How would you tag this suggestion?
Please check your e-mail for a link to activate your account.