Recent

crp_pre_related_postsfilter

Pre-filter the related posts output.

Return a non-null value to short-circuit the default rendering, e.g. to replace it with a lazy load placeholder. Runs for all display methods: content filter, shortcode, widget, block and manual calls.

Type: filter
Since: 4.3.0
Source: includes/frontend/class-display.php line 122

Parameters

Type Name Description
string|null $pre Pre-rendered output. Default null.
array $args Fully parsed arguments array.
\WP_Post $post Post object.

Usage

add_filter( 'crp_pre_related_posts', function($pre, $args, $post) {
    // ...
    return $pre;
} );