Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #298451

    2 months ago i wanted to have my site smaller and you helped me. I changed the grid file and it worked. But after a theme update it changed back. I changed the file in enfold/css/ or did i had to changed in enfold-child? And if it should be enfold-child do i need to add a directory named css?

    Your advice 2 months agoo.

    https://kriesi.at/support/topic/how-to-change-the-total-width-of-the-website/

    I hope you can help

    #298457

    Hi jskooij!

    Copy the whole grid file to your child theme style.css and it will then take priority as the css is loaded into the page.

    Best regards,
    Devin

    #298461

    Hey!

    – To change the grid width

    1. Go to this website and paste the contents of the css/grid.less file.

    2. Change the values of the @maxWidth variables to the desired widths (add 100px, if you want a 900px width you should put “@maxWidthLarge:1000px”) and compile (ctrl / cmd + enter).

    3. Replace the contents of css/grid.css with the generated code on the right.

    – To use a grid.css file on a child theme

    1. Put the modified grid.css anywhere inside your child theme folder, i’d suggest using a css folder to keep the same structure.

    2. Add this code to the child theme functions.php:

    function wp_change_gridcss() {
       if(!is_admin()){
       		wp_dequeue_style( 'avia-grid' );
       		wp_enqueue_style( 'avia-grid-child', get_stylesheet_directory_uri().'/css/grid.css', array(), '2', 'all' );
       }
    }
    add_action( 'wp_enqueue_scripts', 'wp_change_gridcss', 100 );
    

    P. S. In case you don’t want to do the compiling work, here’s a 900px wide grid.css file:
    https://gist.github.com/josueochoa/a543b109eb27709c1c8e

    Best regards,
    Josue

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.