05/08/2014 at 12:18 pm
#290668
Keymaster
@ Christopher
Honestly, I can not think of a way to do this without editing the core Connections code… maybe.
That custom query is the killer…
A solution might be to register a custom shortcode. Grab your query vars, do your custom query, but only select the id column. make sure the results is an indexed array.
Then you could call the method that drives the Connections shortcode:
$atts = array( id => $custom_query_results );
return cnShortcode::view( $atts );
Or, maybe even easier…
Hook into the cn_list_atts filter, do your custom query like I mentioned and set $atts['id'] to an array of ids from the query results and pass back the moadified $atts variable back from the filter.
Will either of these work?
