Start typing to search components and docs…
select navigate ESC close

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

PropTypeDefaultDescription
title*stringPost title displayed as the main heading.
imagestringHero image URL displayed behind/above the title.
langstringLanguage code used by date formatting (e.g. `en`, `pl`).
datestringISO 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.