August 11, 2011

Advanced Templates: Add Alternating Content Between Posts

To add content between posts, we recommend using the Signature Module. If you are using the Classic Theme Builder, Nimble Design Lab, or a pre-made theme, the Signature Module will work for your blog.

When using an Advanced Tempalte Set design, you can place alternating content beween posts using this tip. An Advanced Template Set design is available the Unlimited and higher plans.

Editing Advanced Templates to place content between posts

To begin, go to the Design tab for the blog and click on your Main Index Template to place content between posts in the blog index. You can also place content between posts in the Category and DateBased archives.

Basic Code Structure

Below is a basic example of how the code will be structured. The code will be placed immediately after the MTEntries tag in the template. In this example, content will be added after the first and third posts.

Example with Post Code

Below is an example with the post code included:

Note: The Main Index Template controls all of the paginated main index pages. This means that if you include content after the first post on the main page, it will show in the same spot on the consecutive pages as well.

Example for the Main Index Template

Below includes the full post code, including the tags used for displaying a featured post in the Main Index Template. This code is slightly different from the above code and includes the specific code for showing a Featured Post.

Note that the Featured Post is separate, so if you edit the code to display content after the first post, it will show after the first non-featured post on the page.


Need design help?

Looking to launch a new blog? Have an itch to tweak your design or layout? Want a superior banner or design custom made specifically for your blog? We've got you covered!

Discover Typepad Services