This is the code snippet that you need to set the right sidebar width of the homepage
add_filter( 'generate_right_sidebar_width','tu_custom_right_sidebar_width' );
function tu_custom_right_sidebar_width( $width ) {
// If we're on the home page
if ( is_front_page() ) {
return 40;
}
// Return the default
return $width;
}
This is the code snippet that you need to set the right sidebar width of your category pages
add_filter( 'generate_left_sidebar_width','tu_custom_left_sidebar_width' );
function tu_custom_left_sidebar_width( $width ) {
// If we're on a category
if ( category() ) {
return 40;
}
// Return the default
return $width;
}
This is the code snippet that you need to set the right sidebar width of your blog post
add_filter( 'generate_right_sidebar_width','tu_custom_right_sidebar_width' );
function tu_custom_right_sidebar_width( $width ) {
// If Post
if ( is_single() ) {
return 28;
}
// Return the default
return $width;
}
This is the code snippet that you need to set the left sidebar width of your blog post
add_filter( 'generate_left_sidebar_width','tu_custom_left_sidebar_width' );
function tu_custom_left_sidebar_width( $width ) {
// If Post
if ( is_single() ) {
return 28;
}
// Return the default
return $width;
}
Change the number in the code to whatever makes sense for you.