First of all; scribu this plugin rocks! It really helps with my project in which I have hundreds of events, tens of genres and thousands of artists.
I link genres to events and use get_related to find events that are related to the same genres. But I’ve noticed that the get_related method outputs 10 related posts. Since I have hundreds of events, I’d like to display more.
Is there a way to pass arguments, in this case 'posts_per_page'(like in wp_query) to get_related? Or is there another way to alter the number of results the get_results method outputs?
This works perfectly. But I’d like to declare this function in functions.php instead of in the p2p core since that could backfire when updating the plugin.
I’ve tried adding public function ... to functions.php and add_action('p2p_init', 'my_get_connected') but that doesn’t seem to work. Anyone has an idea how to declare this function outside of the core?
Viewing 1 replies (of 1 total)
The topic ‘pass arguments to get_related’ is closed to new replies.