• Resolved deadcalf

    (@deadcalf)


    When you install the plugin it changes the default product listing from 3 columns to two.
    It is caused by the add_action( ‘body_class’, array ( $this, ‘wpexperts_pdf_add_body_class’ ) );
    because it changes the body class and deletes the qodef-woocommerce-columns-4 class that was originally
    from
    class=”archive post-type-archive post-type-archive-product logged-in admin-bar qode-core-1.3.1 woocommerce woocommerce-page woocommerce-js startit child-child-ver-1.0.0 startit-ver-2.6 qodef-smooth-scroll qodef-grid-1300 qodef-blog-installed qodef-top-bar-mobile-hide qodef-header-standard qodef-fixed-on-scroll qodef-menu-with-large-icons qodef-default-mobile-header qodef-sticky-up-mobile-header qodef-dropdown-default qodef-header-style-on-scroll qodef-search-covers-header qodef-side-menu-slide-from-right qodef-woocommerce-page qodef-woocommerce-columns-4 wpb-js-composer js-comp-ver-5.5.2 vc_responsive customize-support cookies-set cookies-accepted”
    to
    class=”wpexperts-page startit child-child-ver-1.0.0 startit-ver-2.6 qodef-smooth-scroll qodef-grid-1300 qodef-blog-installed qodef-top-bar-mobile-hide qodef-header-standard qodef-fixed-on-scroll qodef-menu-with-large-icons qodef-default-mobile-header qodef-sticky-up-mobile-header qodef-dropdown-default qodef-header-style-on-scroll qodef-search-covers-header qodef-side-menu-slide-from-right qodef-woocommerce-page wpb-js-composer js-comp-ver-5.5.2 vc_responsive customize-support cookies-set cookies-accepted”
    How can we solve this problem?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter deadcalf

    (@deadcalf)

    We solved by adding the class from the function.php file:

    function my_plugin_body_class($classes) {
    $classes[] = ‘qodef-woocommerce-columns-4’;
    return $classes;
    }

    add_filter(‘body_class’, ‘my_plugin_body_class’);

    Plugin Author WPExperts.io

    (@wpexpertsio)

    Hi @deadcalf,

    Thank You for writing to us, we are glad to hear that you were able to solve your problem. We have tested this on our side and everything works fine for woocommerce default themes. We will check furthermore in the issue as this plugin doesn’t have anything to do with woocommerce.

    [ Signature deleted ]

    Same problem here. The fix deadcalf used does not work for us because we have custom post types with different classes…

    Thread Starter deadcalf

    (@deadcalf)

    lautundklar.
    What i would do is to use firefox developer edition and check the classes in the body tag, and load the web with the plugin installed and see what classes you are missing, then add them one by one with this function until you find the oned responsible for the error.
    function my_plugin_body_class($classes) {
    $classes[] = ‘qodef-woocommerce-columns-4’;
    return $classes;
    }

    add_filter(‘body_class’, ‘my_plugin_body_class’);

    Plugin Author WPExperts.io

    (@wpexpertsio)

    Hi @lautundklar,

    Kindly let us know about the issue you are facing our plugin doesn’t has anything to do with woocommerce or custom classes. Can you describe more about your issue as we cannot understand what problems you are facing.

    @deadcalf thank you for providing a solution we are testing the plugin on default wordpress/Woocommerce themes and its working fine without any issues. Let us know which themes are you using so we can dig a bit more.

    [ Signature deleted ]

    Thread Starter deadcalf

    (@deadcalf)

    We are using the theme Startit
    Thanks

    @wpexpertsio

    We had the problem that your PDF Generator plugin and another plugin we used overwrote the body classes of each other. But all CSS classes were necessary. The fix for us was to only set all the body classes in one plugin and comment out the body class function in the other plugin.

    Plugin Author WPExperts.io

    (@wpexpertsio)

    Hi @lautundklar,

    We understood what you are trying to explain and have noted this down in our todo list for the next update. Will fix this soon.

    [ Signature deleted ]

    Hi @wpexpertsio ,
    the issue is with the function wpexperts_pdf_add_body_class in the file wp_objects_pdf_class.php.

    All previous classes get deleted, because the function does integrate them:

            public function wpexperts_pdf_add_body_class(){
                $classes[] = 'wpexperts-page';
                return $classes;
            }

    my version:

    
            public function wpexperts_pdf_add_body_class($classes){
                $classes[] = 'wpexperts-page';
                return $classes;
            }
    
    Plugin Author WPExperts.io

    (@wpexpertsio)

    Hi @aranex,

    Thank you for the defined solution here we will surely update our plugin with the desired fixes.

    Thank You!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Body class causes conflict’ is closed to new replies.