The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group
Put shortcode into a page / post title (including displaying code into the browser page tabs!)
In order to dynamically create page titles, use the following code snippet:
add_filter( 'the_title', 'do_shortcode' );
add_filter('widget_text', 'do_shortcode');
add_filter('document_title_parts', 'wpmu_doc_title_shortcode', 10);
function wpmu_doc_title_shortcode($title) {
$my_title = $title['title'];
$my_title = do_shortcode($my_title);
$title['title'] = $my_title;
return $title;
}
You can then plan how you use it, I did this for a dynamic page title:
In page / post title, I used: [frm-field-value field_id=627 entry="entry_param"]
My link to the dynamic page has the url including the ?entry_param=[id] tag
Anyhow all works nicely
Discussion closed.