Hide Single Post Modified Date
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.
Notice: The option to disable the display of the Modified Date already exists within the Customizer > Blog > Single Post settings.
This code is to be used only if you're displaying the Published and Modified Date at the same time, but you do not wish to display the Modified Date if the same as the Published Date:
// Hide single post modified date if the same as the published date. function my_single_modified_date_state() { return true; } add_filter( 'ocean_single_modified_date_state', 'my_single_modified_date_state' );
All PHP snippets should be added via a child theme's functions.php file.