layers_after_post_loop

Since: 1.0.7 Last Updated:
Back to Main Index

Outputs your custom code before the closing </section> wrapper, and after the loop on single posts. Code is placed outside the loop, so ensure core hooks or functions you use are compatible.

Location: single.php

Code output appears after

Code output appears before

Usage:

This hook is very useful for inserting custom elements or functionality after the entire post and sidebar, but that you still wish to stay inside the <section>  wrapper. This example adds a Featured section from the Layers Framework examples which serves as a post footer.

If you used layers_before_post_loop to modify the query, you can reset the query with rewind_posts() like this: