Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Manually Curated Related Posts - Pre-Loop Code
<?php
/**
* Related Posts Before Loop
* Adds connection data to $wp_query. Run before the loop.
*
* @author Bill Erickson
* @link http://www.billerickson.net/manually-curated-related-posts/
*/
function be_related_posts_pre_loop() {
// Make Sure plugin is active
if ( !function_exists( 'p2p_register_connection_type' ) )
return;
global $wp_query;
p2p_type( 'related-articles' )->each_connected( $wp_query );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.