Why does Royal Theme has it's own products-class (products-loop)?

This topic has 6 replies, 2 voices, and was last updated 9 years, 3 months ago ago by Jack Richardson

  • Avatar: Royalty
    Royalty
    Participant
    August 29, 2016 at 08:21

    Hello,
    I am wondering why Royal Theme does not use the default class for products in the loop? The class provided by woocommerce (in loop/loop-start.php) is called “products”, but Royal Theme’s class is called “products-loop”. This leads to problems with several plugins which fail to find woocommerce’s “products” class.

    So I copied loop-start.php to my childtheme and added the “products” class by myself, means that I transformed the following code:
    <div class="row products-loop <?php echo $view_class; ?> row-count-<?php echo $woocommerce_loop['columns']; ?>">
    to
    <div class="row products products-loop <?php echo $view_class; ?> row-count-<?php echo $woocommerce_loop['columns']; ?>">

    Then the plugins work but I am not sure if adding this class could lead to new problems?

    5 Answers
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    August 29, 2016 at 09:39

    Hello,

    We edited some woocommerce templates to modify design according to the theme. And yes you can customize the theme to your needs using child theme.

    Best regards,
    Jack Richardson.

    Avatar: Royalty
    Royalty
    Participant
    August 29, 2016 at 10:34

    Thanks. I know that I can customize the theme using my childtheme. I just wanted to know if the specific change I made (adding the “products” class to the string in loop-start.php) could cause any problems?

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    August 29, 2016 at 11:03

    Hello,

    Changes you made shouldn’t cause any problems.

    Best regards,
    Jack Richardson.

    Avatar: Royalty
    Royalty
    Participant
    August 29, 2016 at 11:52

    Ok thank you!

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    August 29, 2016 at 12:27

    Hello,

    You are welcome.

    Best regards,
    Jack Richardson.

  • Viewing 6 results - 1 through 6 (of 6 total)

The issue related to '‘Why does Royal Theme has it's own products-class (products-loop)?’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.