• Resolved lucifer63

    (@lucifer63)


    Hello!

    I want my shop page to look like

    [products]
    [description]

    instead of

    [description]
    [products]

    After a little search i found a discussion at wp.org, that says “shop page uses the archive-product.php file which you can find in the woocommerce/templates/ dir”

    If i got it right, the full path is domain/wp-content/plugins/woocommerce/templates/archive-product.php, am i right? Anyway, i edited it a little and nothing changed, my site looks the same.

    Another thing i found in the discussion is “If you edit a template, please be sure to copy it to your theme” and “It should be child_theme/woocommerce/archive-product.php”, so i assumed the full path is domain/wp-content/themes/zerif-lite/woocommerce/archive-product.php. I put archive-product.php in this directory and nothing changed. Again.

    Seems like the only way to make wp use woocommerce/templates/archive-product.php is to go to woocommerce settings, tab “Tools” and enter template debug mode.

    In this mode wp for sure uses this template. But when it’s not in debug mode it uses… i don’t know what it uses) Seems like template it uses is stored somewhere else, not in woocommerce/templates/archive-product.php. Or maybe its cached? But how, i cleared the cache already

    Any help appreciated!
    Thx in advance!

    https://wordpress.org/plugins/woocommerce/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter lucifer63

    (@lucifer63)

    If i delete the entire domain/wp-content/plugins/woocommerce/templates folder the only thing that changes is product elements, they look not as good as earlier. Nothing else has changes. Magic.

    Thread Starter lucifer63

    (@lucifer63)

    Things i did:
    1. Edited woocommerce/templates/archive-product.php
    2. Copied it to zerif-lite/archive-product.php
    3. Copied it to zerif-lite/woocommerce/archive-product.php

    Nothing has changed at all

    Please post the url to your site.

    Thread Starter lucifer63

    (@lucifer63)

    Thread Starter lucifer63

    (@lucifer63)

    Ok, the problem was in the last part of the “Template structure” article:

    When creating woocommerce.php in your theme’s folder, you will be unable to override the woocommerce/archive-product.php custom template in your theme, as woocommerce.php has priority over all other template files

    I deleted woocommerce.php from theme’s folder, this has solved the problem but actually this needs some work too: in this woocommerce.php file was some necessary code (like closing </header> and opening <div id="main">, so i added it manually to mytheme/woocommerce/archive-product.php

    The problem is solved now, but i feel that there were some better solution… like creating a child theme!

    I tried to, and i did it well at all, but alas – the official manual how to creat child theme doesn’t contain information about how to make your child theme use it’s parent’s settings, so when i created child theme, it was blank.

    If any of you can provide for example a link to full guide how to create child theme (and also make it use parent theme’s settings) – it will be great!

    Thanks for the feedback, I didn’t know that.

    Child themes don’t use their parent theme settings. They have their own separate settings in the database. You’ll have to copy the settings across. There are some child-theme-helper plugins which may help. Only the code is shared, apart from any templates you override and separate css. Anything in functions.php runs as well as and after functions.php in the parent theme.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Change shop index page’ is closed to new replies.