• I want to reduce width of articles when I not use sidebars. I managed to reduce size with css but than homepage and archives also changed and look ugly. I only want to reduce size of posts not archives

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello Oblanda,

    I would recommend to inspect your pages and write some css rules in the custom css setting of the live customizer.

    Useful resources for WordPress site customization:?

    https://docs.presscustomizr.com/article/72-basics-of-css-and-html-for-wordpress-themes

    https://docs.presscustomizr.com/article/63-css-resources-for-wordpress-developers

    Difficult and I believe will be problematic. Also too odd for a site to have browser windows half empty. Instead consider choosing the post size full width no sidebars and enjoy filling the the full with.

    Hi Oblanda,

    Let me know if there’s anything else I can help with. Have a good day!

    Edit: Fixed it, problem was typo.

    Hello,

    I am trying to achieve the same. I created a new layout as shown here: https://presscustomizr.com/snippet/changing-the-global-column-layout-of-the-customizr-theme/

    My content should have the width of span10 and two invisible sidebars of span2 to center the content. But the problem is that the right sidebar is not shown properly, instead it floats to the left. How can I fix this? My code:

    add_filter('tc_global_layout', 'my_custom_layout' );
    function my_custom_layout( $layout ) {
        $my_layout      = array(
            'r' => array ('content' => 'span10' , 'sidebar' => 'span2'),//sidebar on the right
            'l' => array ('content' => 'span10' , 'sidebar' => 'span2'),//sidebar on the left
            'b' => array ('content' => 'span8' , 'sidebar' => 'span2'),//both : two sidebars
            'f' => array ('content' => 'span10' , 'sidebar' => false),//full width : no sidebars
        );
    	
        //sets new values for content and sidebar (checks if there are new values to set first)
        foreach ($layout as $key => $value) {
            $layout[$key]['content']   = isset( $my_layout[$key]['content']) ? $my_layout[$key]['content'] : $layout[$key]['content'];
            $layout[$key]['sidebar']   = isset( $my_layout[$key]['sidebar']) ? $my_layout[$key]['sidebar'] : $layout[$key]['sidebar'];
        }
        return $layout;
    }
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to reduce width of single post when there are no sidebars’ is closed to new replies.