I'm currently working with Wordpress. I have a hook that runs before a <title>
attribute is populated with text that a user enters in the dashboard.
Now I want to set a default title of each page to equal an <h1>
attribute text value on a current page. A fragment of the callback function for the hook I'm working with would look like:
if (!$seoTitle) {
$seoTitle = '<....>';
}
return $seoTitle;
I want seoTitle
to default to an <h1>
element text on the current page. Is it doable? How can I achieve this?