Categories not been fully populated again after updating

Hi,

We are having the same issue as this thread again

I cannot see how I can change any settings to help pull all of the categories through in mainwp?!

Hi @NeilSpinney

Last time we prepared a modified version of the MainWP Child plugin that synced 10 000 post categories from Child Sites. And when the new version of the MainWP Child plugin was released, the modification made got overwritten, and now the limit is back to the default value of 300.

We will make a filter that will enable you to customize this number of synced post categories.
As soon we have it ready, we will share it with you via this thread.

Hi @bojan

many thanks for the update and I look forward to the new version.

We’ve prepared versions of the Dashboard and Child plugins with a new filter.

MainWP Dashboard plugin: Dropbox - mainwp.zip - Simplify your life
MainWP Child plugin: Dropbox - mainwp-child.zip - Simplify your life

After you install the Dashboard and the Child plugin to all child sites, add this filter to the Dashboard (easiest way is using our Custom Dashboard extension).

add_filter( 'mainwp_get_post_data_authed', 'mycustom_mainwp_get_post_data_authed', 10, 4 );
function mycustom_mainwp_get_post_data_authed( $data, $website, $what, $params ) {
		$data['categories_number'] = 1500;
	return $data;
}

Define the number of categories in the $data['categories_number'] variable.

And if you want to change the number of categories only for certain sites, use this filter.

add_filter( 'mainwp_get_post_data_authed', 'mycustom_mainwp_get_post_data_authed', 10, 4 );
function mycustom_mainwp_get_post_data_authed( $data, $website, $what, $params ) {
	if( $website && $website->id == SOME_SITE_ID ){
		$data['categories_number'] = 1500;
	}
	return $data;
}

Please do let us know if this helps.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.