Yes @afaust that’s possible with some custom PHP. I’m going to show it to you, but if typing out PHP is too daunting for you I’d recommend you talk to (or hire) a developer.
But this is the PHP you could use:
<h2>Related</h2>
<?php yarpp_related(); ?>
<h2>Staff</h2>
<?php yarpp_related(array('post_type' => 'staff'));?>
The first call to yarpp_related()
uses all of YARPP’s settings set in the admin and so can use YARPP’s cached results (so it’s very efficient).
The second call to yarpp_related()
forces YARPP to only return posts of type “staff” (I’m guessing that’s your custom post’s type, otherwise you should replace that with whatever it is for your staff post type). Unfortunately YARPP isn’t currently setup to cache this second query, so it’s not terribly efficient (the query can take half a second on large sites). If you want to improve efficiency you’d have to use WordPress’ set_transient function to cache the results yourself. Something like this:
<h1>Custom query</h1>
<?php
$result = get_transient('yarpp_custom_results_for_' . $post->ID);
if(! $result){
$result = yarpp_related(['post_type' => 'staff'],null,false);
set_transient('yarpp_custom_results_for_' . $post->ID, $result,60 * MINUTE_IN_SECONDS);
}
echo $result;
That will cache the YARPP results for 60 minutes.
Does that make sense?