Home Forums Etch shop with 5 columns

This topic contains 37 replies, has 2 voices, and was last updated by  boavida.maria 2 months ago.

Viewing 15 posts - 1 through 15 (of 38 total)
  • Author
    Posts
  • #46422

    boavida.maria
    Participant

    hello,
    by default on demo i imported, my shop page has only 3 columns, but i would like it to have 4 or 5, where can i change this?
    thank you,
    maria boavida

    #46424

    Joshua
    Keymaster

    Woocommerce does not let you do this with a setting, but you can change it by adding the following to your child theme’s functions.php file:

    function etch_child_loop_columns() {
    	return 5;
    }
    add_filter('loop_shop_columns', 'etch_child_loop_columns');
    #46444

    boavida.maria
    Participant

    Hi joshua,
    thank you for such fast reply and for the info, however i’m not being able to make this change, due to my inexperience with wordpress;

    I placed the code on the functions.php file, but the site went down right away. I was able to put it back, but maybe this is because i don’t have the “child”-theme?

    I don’t know what this is or how this is created, is this an important thing to do?
    what are the consequences of not using a child theme?
    i saw the wordpress help that suggest we make one, if there are many functions to change, however when do i know those changes are being “too much”?

    thank you

    #46448

    Joshua
    Keymaster

    You should always make a child theme for edits like this regardless of how many.

    There is a child theme included with the package you download from ThemeForest under the “Developers” folder. Try uploading that and add the above code to its functions.php file.

    #46453

    boavida.maria
    Participant

    ah! Ok!
    i’ve upload the child theme and i placed the code on the functions.php, but nothing happened..
    i placed the code after what was already written there; should i make something different?

    i have another question regarding the shop:
    the shop is only one page, but i would like to make sub-pages were i can organize the products. I create a new page but how do i tell it that that page is as well a ahop, so the products should appear there?
    i alredy told the page her parent is the “shop”.

    thank you!

    #46454

    Joshua
    Keymaster

    Did you activate your child theme? If so, can you link to your site so I can take a look at the shop page?

    For separate shop pages, you might want to look into categories as an easy fix for what you’d like to do – http://chrislema.com/woocommerce-category-pages/

    #46457

    boavida.maria
    Participant

    Hi joshua,

    Oh, now is activated!
    so the link is this:

    after i put the code in the functions, the shop gets only 1 column with giant images. (now i put it back normal with the default 3 columns)

    thnak you the separate shop pages is solved!

    #46458

    boavida.maria
    Participant
    This reply has been marked as private.
    #46459

    Joshua
    Keymaster

    I’ll need to see the page with the function added in order to help. Could you put it back in temporarily?

    #46460

    boavida.maria
    Participant

    Ok, it’s now with the function: http://www.serradura.pt/shop/

    This is what the functions.php has written:

    <?php

    /**
    * Enqueue child theme styles
    */
    function etch_child_enqueue_styles() {
    wp_enqueue_style(‘etch-child’,
    get_stylesheet_directory_uri() . ‘/style.css’
    );
    }
    add_action(‘wp_enqueue_scripts’, ‘etch_child_enqueue_styles’);
    function etch_child_loop_columns() {
    return 5;
    }
    add_filter(‘loop_shop_columns’, ‘etch_child_loop_columns’);

    #46461

    Joshua
    Keymaster

    That’s very odd behavior. Not sure if there’s another plugin overwriting the column hooks, but I’ll investigate.

    In the meantime, you can add this to your child theme’s style.css sheet to force them into 5 columns (they will be 1 column on iPad sizes and down):

    @media (min-width: 768px) {
    div.woocommerce.product-grid-item {
        width: 20%;
        float: left;
        padding-left: 30px;
        padding-right: 30px;
    }
    }
    #46462

    boavida.maria
    Participant

    ok..
    anyway i put this in the style.css but nothing happened (i erased the other one in functions – was this supposed to?)

    the style sheet looks like this:

    /*
    Theme Name: Etch Child
    Theme URI: http://themeluxe.com/themes/etch
    Description: Etch Child Theme
    Author: Joshua Flowers
    Author URI: http://themeluxe.com
    Template: etch
    Version: 1.0.0
    License: GNU General Public License v2 or later
    License URI: http://www.gnu.org/licenses/gpl-2.0.html
    Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
    Text Domain: etch-amin
    @media (min-width: 768px) {
    div.woocommerce.product-grid-item {
    width: 20%;
    float: left;
    padding-left: 30px;
    padding-right: 30px;
    }
    }
    */

    #46463

    Joshua
    Keymaster

    Did you maybe upload the etch child theme inside another folder called etch-child?

    The URL looks like it’s looking for a style.css file in a nested folder – themes/etch-child/etch-child/style.css

    It should be in themes/etch-child/style.css. This might me the theme was installed incorrectly.

    #46464

    boavida.maria
    Participant

    Hi joshua,
    you’0re right, thank you for that, it was in a duplicated folder..
    however i placed the css but nothing happenes. you can check: http://www.serradura.pt/shop/

    sO 4 columns are enough for the shop; should i try the code again in the functions.php or i keep css?

    i pasted the css, on the “customize-advanced-editor-stylesheet” by i saw that in the editor on the dashboard that code wasn’t there, so i placed it in that one as well – is this normal?

    #46465

    boavida.maria
    Participant

    i have another 2 problems:

    1 – the text in the footer has a title and subtitle (widgets), however, the title is much smaller than the text (before it wasn’t like that); i’ve tried changed the typography anywhere i saw it but nothing changes – where do i define the size/color of the titles of the widgets?

    2 – the shop page is showing 10 products per page, but i want it to show only 9 or 6 – where can i define this?

    thank you

Viewing 15 posts - 1 through 15 (of 38 total)

You must be logged in to reply to this topic.