layers_after_comments

Since: 1.1.5 Last Updated:
Back to Main Index

Outputs your custom code after the comments wrapper in a single post or page. Code is output inside the loop.

Location: comments.php

Code output appears after:

Code output appears before:

 (varies by template, the above uses single.php as an example)

Usage:

This hook is very useful for inserting custom elements or functionality after the post content comments, but within the same main section wrapper. In comparison, layers_after_post_loop also inserts code after the comments, but outside of the row wrapper (below both the content and the sidebar) but only in single posts. This hook only displays content if comments are on – use layers_after_single_post to insert code into the same position that needs to show on comment-disabled templates.

Using the code snippet from wpbeginner.com: