layers_before_single_title_meta

Since: 1.0.7 Last Updated: Version: 1.1.5
Back to Main Index

Outputs your custom code before the Post Meta on the single post and pages that do not use the big header title.

Location: partials/content-single.php

Code output appears after:

Code output appears before:

Usage:

By default, the date is output before the title on single posts, and repeated again at the end of the post. This hook is useful for inserting your own custom meta, links or HTML into this location. When inserting your own meta snippet, be sure to hide the original with CSS. In this example, we insert a custom layers_post_meta()  snippet to show the category instead of the date. The default instance of the date can then be hidden by CSS with  .single header .meta-date{display: none;} , no modification to the template needed!

1.1.5 – This hook is now dependent on whether the template is being used explicitly to display the “post” post type, so will not display content if you are using the single partial in a custom post type.