Thread Starter
Dan
(@danjsouther)
Of course that creates problems elsewhere so for a quick fix I made a copy of that function without the problematic array entry for the custom_pre_get_post() to use.
Thread Starter
Dan
(@danjsouther)
I added that code and got the error,
Fatal error: Unknown: Cannot use output buffering in output buffering display handlers in Unknown on line 0
I was able to trace it to your plugin.php file
function get_all_category_posts($cat_id = null){
if ($cat_id == null) return array();
$cat_meta = get_option( "in_category");
$order = isset($cat_meta[$cat_id])? $cat_meta[$cat_id]: array();
$posts = get_posts(array(
'post_type' => 'post',
'posts_per_page' => -1,
'post__not_in' => $order,
'fields' => 'ids',
'cat' => $cat_id
)
);
foreach ((array)$posts as $p) {
$order[] = $p;
}
return $order;
}
after removing ‘cat’ => $cat_id the error went away.