apply_filters ( 'jetpack_relatedposts_filter_enabled_for_request', bool $enabled )

Filter the Enabled value to allow related posts to be shown on pages as well.

Source file: modules/related-posts/jetpack-related-posts.php

View in GitHub

Parameters

$enabled

(bool) Should Related Posts be enabled on the current page.


Changelog

Since: Jetpack 3.3.0


Notes

Related Posts aren’t enabled on Pages by default. You can, however, use this filter to change that. Here is how to use it:

function jeherve_allow_pages_for_relatedposts( $enabled ) {
	if ( is_page() ) {
		$enabled = true;
	}
	return $enabled;
}        
add_filter( 'jetpack_relatedposts_filter_enabled_for_request', 'jeherve_allow_pages_for_relatedposts' );

Have a note to contribute?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s