Home Forums WoodMart support forum Change badges position

Change badges position

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #166402

    nicksfikas
    Participant

    Hi,
    For some reason when I activate my child theme the badges change position: https://www.dropbox.com/s/qefpa38dot2uv8j/Screenshot%202020-01-06%2000.05.53.png?dl=0

    This is how my website looks without the child theme:
    https://www.dropbox.com/s/4gyvggqij2k5y4b/Screenshot%202020-01-06%2000.08.10.png?dl=0

    #166477

    Hello,

    I visited your site. It’s due to your customization in child theme, when I activate the parent theme those badges shown on their right position.

    So if you want to display those badges on the upper right corner of product image then simply undo you custom code changes which you make to change the position of badges and save the changes and then check back after clearing your site and browser cache.

    Best Regards.

    #166537

    nicksfikas
    Participant

    this is the custom code from my child theme:

    <?php
    /**
    * Enqueue script and styles for child theme
    */
    function woodmart_child_enqueue_styles() {
    wp_enqueue_style( ‘child-style’, get_stylesheet_directory_uri() . ‘/style.css’, array( ‘woodmart-style’ ), woodmart_get_theme_info( ‘Version’ ) );
    }
    add_action( ‘wp_enqueue_scripts’, ‘woodmart_child_enqueue_styles’, 1000 );

    // Ship to a different address closed by default
    add_filter( ‘woocommerce_ship_to_different_address_checked’, ‘__return_false’ );

    //editable order statuses
    add_filter( ‘wc_order_is_editable’, ‘wc_make_processing_orders_editable’, 10, 2 );
    function wc_make_processing_orders_editable( $is_editable, $order ) {
    if ( $order->get_status() == ‘processing’ )
    {
    $is_editable = true;
    }
    return $is_editable; }

    //remove shop title
    add_filter( ‘woocommerce_show_page_title’, ‘bbloomer_hide_shop_page_title’ );

    function bbloomer_hide_shop_page_title( $title ) {
    if ( is_shop() ) $title = false;
    return $title;
    }

    I don’t have any code for the badges :/

    #166538

    nicksfikas
    Participant

    I also tried to remove this child theme and add a new blank one and the error is still there

    #166630

    Hello,

    When I inspect your child theme and then parent theme product page, there is a margin difference for badges. Normally our support did not cover the custom code issues which generates due to child theme because it is out of our scope. You are using the below code somewhere in your child theme due to which the position changes:

    .onsale.product-label {
       left: 0;
       float: left;
    }

    Just remove that code and then back after clearing your site and browser cache.

    Best Regards.

    #166653

    nicksfikas
    Participant

    I created a new child theme and I have still the same issue…
    I downloaded the child theme and the theme to a new local website and the issue doesn’t exist

    What should I do?

    #166670

    Hello,

    Your problem is resolved. Actually your child theme style.css was empty and it picks that CSS code from the index.php file. So to fix this I copy the styling of parent theme and paste it into the child version of theme and it picks the correct style. Then I override with below CSS code:

    .onsale.product-label {
       right: 0 !important;
       float: right !important;
    }

    Now your badges shown perfectly fine even with the child theme.
    Screenshot for clarification: https://jmp.sh/t33QMNw

    Best Regards.

    #166672

    nicksfikas
    Participant

    After you did this change I can not use WP Rocket

    #166705

    Hello,

    The “Wp-Rocket” was disable in your site, I enable it and test it and it is working just fine.

    Kindly clear your browser cache and then check back.

    Best Regards.

    #166888

    nicksfikas
    Participant

    The style.css that you wrote broke my website, so I had to delete it!
    Nevermind I fixed the issue…

    I have another issue now, some product photos in the homepage look like this (see screenshot). How can I fix it?

    Attachments:
    You must be logged in to view attached files.
    #166890

    Hello,

    I have seen your screenshots and test your site, Somewhere in your child theme you add custom code to customize the WoodMart buttons inside the product item card which causing this issue. Just undo those changes and your issue get fixed.

    I have test your site with parent theme and there is no such issue. It looks just perfectly fine.

    Screenshot for clarification: https://jmp.sh/oykcMLO

    Best Regards.

    #166892

    nicksfikas
    Participant

    but I haven’t added any custom code to customize the WoodMart buttons inside the product item card in my child theme. You can check

    #166899

    Hello,

    You can check by activating your parent theme from Appearance >> Menus, The issue only sown in your child theme. I agreed as you said you do not write any custom code to customize the WoodMart buttons.

    But this is also possible that you add some custom code for some other purposes in your child theme and it conflicts with the styling of those buttons which are inside the product grid item. So you have to troubleshoot your child theme because there must be some piece of code which change the styling of those buttons.

    Best Regards.

Viewing 13 posts - 1 through 13 (of 13 total)