• Resolved riderchris

    (@riderchris)


    Hi,

    If I am correct, the default post width is set at 786px. Questions as per below:

    1. If I want to increase it to 900px, what are the css codes? Thanks.

    2. Say I already increase the post width to 900px with the code above, how can I force my current post images width to be 900px as well?

    Appreciate your reply. Thanks.

Viewing 15 replies - 1 through 15 (of 15 total)
  • Theme Author CrestaProject

    (@crestaproject)

    Hi @riderchris,
    the default post width (on desktop) is set by default to 930px.
    If you want to change the post width just go to your WordPress Dashboard under “Appearance-> Customize-> Additional CSS” and paste this code:

    
    .site-content, .site-footer {
        max-width: 930px;
    }
    

    And change the number 930 with the value you prefer πŸ™‚

    Best Regards,
    CrestaProject

    Thread Starter riderchris

    (@riderchris)

    Thanks that worked and my post width is now 1024px. However there is an issue, my images width are not width to 1024px.it is still on older width. How can i set my images width to be at 1024px as well? any css code for this? see the link for sample..

    https://ibb.co/em7EJF

    Theme Author CrestaProject

    (@crestaproject)

    Hi @riderchris,
    This is a bit more complicated πŸ™‚
    You should edit the “functions.php” file of the theme and find the line:

    
    $GLOBALS['content_width'] = apply_filters( 'fortunato_content_width', 930 );
    

    This way you can change “930” with your value.
    But remember that this value will be reset to 930 every time there is a new theme update.

    Best Regards,
    CrestaProject

    Thread Starter riderchris

    (@riderchris)

    I have created a child theme actually. If i made these changes, will i lose them after a theme update?

    On another question, how can I change the post font types? I.e. Google fonts

    Theme Author CrestaProject

    (@crestaproject)

    Hi @riderchris,
    in the PRO version you can change the Google Fonts directly using the theme options. In this case you can use the plugin called “Easy Google Fonts” to choose the font you prefer πŸ™‚

    Best Regards,
    CrestaProject

    Thread Starter riderchris

    (@riderchris)

    Thank for the recommendation, i’ll have a look at it. However you missed to answer my first question.

    I have created a child theme on my site. If i made these changes in functon.php, will i lose them after a theme update?

    Theme Author CrestaProject

    (@crestaproject)

    Hi @riderchris,
    ops sorry, if you have inserted the changes in a child theme you will not lose these changes πŸ™‚

    CrestaProject

    Thread Starter riderchris

    (@riderchris)

    I tried adding the codes into my function.php child theme file and the image width did not change to 1024px. My function.php file as per below:

    /**
    * Loads parent and child themes' style.css
    */
    function orbisius_ctc_fortunato_child_theme_enqueue_styles() {
    $parent_style = 'orbisius_ctc_fortunato_parent_style';
    $parent_base_dir = 'fortunato';

    wp_enqueue_style( $parent_style,
    get_template_directory_uri() . '/style.css',
    array(),
    wp_get_theme( $parent_base_dir ) ? wp_get_theme( $parent_base_dir )->get('Version') : ''
    );

    wp_enqueue_style( $parent_style . '_child_style',
    get_stylesheet_directory_uri() . '/style.css',
    array( $parent_style ),
    wp_get_theme()->get('Version')
    );
    }

    add_action( 'wp_enqueue_scripts', 'orbisius_ctc_fortunato_child_theme_enqueue_styles' );

    $GLOBALS['content_width'] = apply_filters( 'fortunato_content_width', 1024 );

    Thread Starter riderchris

    (@riderchris)

    Hopefully someone will reply to my questions above. Is it because I need to specified the child theme name in your code? i.e. replace the fortunato word with ‘child_fortunato_contend_width?

    $GLOBALS[‘content_width’] = apply_filters( ‘fortunato_content_width’, 1024 );

    Thanks CrestaProject

    Theme Author CrestaProject

    (@crestaproject)

    Hi @riderchris,
    Try to add this function in your functions.php child theme:

    
    function fortunato_child_content_width() {
    	$GLOBALS['content_width'] = apply_filters( 'fortunato_content_width', 1024 );
    }
    add_action( 'template_redirect', 'fortunato_child_content_width', 0 );
    

    PS: not tested.

    Best Regards,
    CrestaProject

    Thread Starter riderchris

    (@riderchris)

    Unfortunately, that did not work, I understand this is not tested and I guess, I just need to give up on this unless you have something else for me to try?

    Have a nice day Cresta Team.

    Theme Author CrestaProject

    (@crestaproject)

    Hi @riderchris,
    if you want, can you link me your website?

    Best Regards,
    CrestaProject

    Thread Starter riderchris

    (@riderchris)

    Sure, it is http://www.riderchris.com and if you see the post at the link below, the image width does not tally with the post width of 1024px which I’ve changed.

    https://www.riderchris.com/trips/living-land-rice-farm/

    It would be great if all the image width size can be at 1024px by default. Thanks for your help.

    Theme Author CrestaProject

    (@crestaproject)

    Thread Starter riderchris

    (@riderchris)

    Hi thanks. I thought so, I did not add anything now for the function.php as the code below that you supplied seems to be working for both post width and image width.

    .site-content, .site-footer {
    max-width: XXXpx;
    }

    You guys have been very helpful and it would be a shame if I could not support your work. I will email your team as I would like to purchase the premium version of this theme with your social share counter plugin. Keep up the good work.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Post Width’ is closed to new replies.