Alter Page Subheading
This is a Developer Level doc.
If you're unfamiliar with PHP and/or editing files, codes and templates, as well as with resolving possible conflict, please seek help from a professional. Under our Support Policy, we don't provide support for modifications and customization.
If you want to remove the subheading on the Author's page, for example, use the following PHP snippet:
// Remove Author Page Subheading
function my_remove_author_subheading( $subheading ) {
// Set subheading to empty for author archive
if ( is_author() ) {
$subheading = '';
}
// Return the subheading
return $subheading;
}
add_filter( 'ocean_post_subheading', 'my_remove_author_subheading' );
Adjust the is_author() per your need. Other examples include: is_front_page(), is_singular(), is_search(), ....
All PHP snippets should be added via a child theme's functions.php file.