Disable Date on Related Posts

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 disable the display of the published date on Single Blog Post Related Post items, you can use the following PHP snippet:

// Disable date on Single Post related items.
function my_related_posts_date() {
return false;
}
add_filter( 'ocean_related_posts_date', 'my_related_posts_date' );

The difference between using a PHP and a CSS snippet to achieve this, is that the PHP snippet doesn't print the HTML related to published date and time of related post items.

All PHP snippets should be added via a child theme's functions.php file.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.