PostHeader
WordPress PostHeader - post top component for WordPress Single Post template data like categories etc. comes from WP Rest API.
PostHeader with some content for WordPress single page template
<div class="relative">
<PostHeader
author={ { firstName: 'Szymon', name: 'CNK' } }
lang="en"
categories={ [{"name":"Tools & garage accessories","uri":"/category/garage/tools-garage-accessories/"}, , {"name":"Lorem Ipsum","uri":"#"}] }
title="Lorem Ipsum"
date="2023-07-13T01:35:03"
image="https://placehold.co/1380x920"
/>
</div>
PostHeader - only title
Lorem Ipsum
<div class="relative">
<PostHeader
title="Lorem Ipsum"
lang="en"
image="https://placehold.co/1380x920"
/>
</div>
Props
| Prop | Type | Default | Description |
|---|---|---|---|
title* | string | — | Post title displayed as the main heading. |
image | string | — | Hero image URL displayed behind/above the title. |
lang | string | — | Language code used by date formatting (e.g. `en`, `pl`). |
date | string | — | ISO 8601 publication date (e.g. `2023-07-13T01:35:03`). |
author | { firstName: string; name: string } | — | Post author — `name` is displayed, `firstName` populates the title attribute. |
categories | { name: string; uri: string }[] | — | Category objects rendered as links above the title. |