usePostTemplate
The usePostTemplate
hook returns the current active template.
Import
import {usePostTemplate} from '@tinypixelco/wp-react-hooks'
Usage
const [template] = usePostTemplate()
Example
import {usePostTemplate} from '@tinypixelco/wp-react-hooks'const component = () => {const [template] = usePostTemplate()return (<div>Current template: {template || ''}</div>)}