• Hi
    I am using this theme on my website.
    I want to know how can I change the width of sidebar and post on the home page. I want to increase the size of the article.

    please help me out

    thanx

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Leo

    (@leohsiang)

    Hi there,

    If it’s just for the front page, then the first PHP snippet here is what you need:
    https://docs.generatepress.com/article/sidebar-widths/#using-a-filter

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    Let me know if this helps ??

    Thread Starter atika66

    (@atika66)

    I want to increase left sidebar width.

    Thread Starter atika66

    (@atika66)

    please guide me.

    codestart//

    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;
    }
    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;

    //code end

    I have seen this code but I want to know that what should me the px. I want to set left sidebar about 90% and a right sidebar about 10%

    Leo

    (@leohsiang)

    I want to set left sidebar about 90% and a right sidebar about 10%

    Can you explain a bit more? If the left sidebar is 90% and the right sidebar is 10%, what about the content?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Change in width of post and sidebar’ is closed to new replies.