For some reason, the code below is not working for me.
Im trying to set
cpt1 = 3 widgets (working)
blog single pages = 3 (not working)
default = 0 (working)
add_filter( ‘generate_footer_widgets’,’tu_custom_blog_footer_widgets’ );
function tu_custom_blog_footer_widgets( $widgets )
{
// If we are on the blog, set the number
if ( is_singular( ‘cpt1’ ) )
return ‘3’;
if ( is_singular( ‘post’ ) )
return ‘3’;
// Or else, set the regular number
return $widgets;
}