• Resolved bowenac

    (@bowenac)


    Latest version of WooCommerce. Just noticed my single products for some reason are now using the themes single.php. I have no single-product.php template overrides, and for whatever reason its using the themes single.php

    Is this happening for anyone else? Anyone have any ideas as to what could be causing this?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Liv82

    (@liv82)

    Yeah, my single product pages are all messed up. Was just putting the finishing touches on the site before a pre-launch meeting to show the client how the site works but I guess that will have to be postponed.

    I’m going to keep digging to see if there are any plugin or php conflicts… I’ll let you know if I find anything, please do the same ??

    I think we are having the same issue. I am having double overlap issues on single product pages.

    sharmaabhi

    (@sharmaabhi)

    I’m having the same issue. If any of you resolve it please tell me.
    Thanks

    Beginner

    (@ar4jun)

    I’m also having the same issue. If any one have any fix about this,kindly post here. Thanks!

    Mikey (a11n)

    (@mikeyarce)

    Hey everyone!

    I tried out a few different themes on my site running 3.3.3 and I did not find the single.php loading. Instead, the default singe-product.php from WooCommerce is loading. I checked and the themes I tested all had their own single.php files.

    Example:

    If you are running into this issue, can you let us know which theme you are using? If you switch to a different theme like Storefront, does it still happen?

    Thread Starter bowenac

    (@bowenac)

    For me I’m using a custom theme I developed based on underscores _s

    sharmaabhi

    (@sharmaabhi)

    I was using default twenty-fourteen theme. I used below hook in functions.php file then it started working normally.

    function mytheme_add_woocommerce_support() {
    	add_theme_support( 'woocommerce' );
    }
    add_action( 'after_setup_theme', 'mytheme_add_woocommerce_support' );

    But I did not get this issue with storefront theme.

    Mikey (a11n)

    (@mikeyarce)

    @bowenac, If you switch to a default theme does this problem go away?

    @sharmaabhi, Thanks for the update. That is very odd – when I try Twenty Fourteen I do not get the same issue. Can you tell me what version of WooCommerce you were on and what version of Twenty Fourteen? Thanks!

    Thread Starter bowenac

    (@bowenac)

    @mikeyarce like @sharmaabhi adding add_theme_support( ‘woocommerce’ ); fixed the issue for me… still not sure what would have caused this in a recent update… without theme support apparently something odd happens?

    Mikey (a11n)

    (@mikeyarce)

    Hi @bowenac,

    adding add_theme_support( ‘woocommerce’ ); fixed the issue for me… still not sure what would have caused this in a recent update… without theme support apparently something odd happens?

    I realized this is actually the expected behaviour. If the theme does not declare WooCommerce support, WooCommerce will not try to load it’s templates on top, but instead use the theme’s templates, like single.php instead.

    IF the theme does declare support, it will load the WooCommerce templates.

    The default themes, though, are a bit different – since WooCommerce does add support for them by default, so they are a bit of a different case.

    If you do want to load WooCommerce templates, you can set your theme to support WooCommerce like this:

    
    function mytheme_add_woocommerce_support() {
    	add_theme_support( 'woocommerce' );
    }
    add_action( 'after_setup_theme', 'mytheme_add_woocommerce_support' );
Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Single Product is using single.php not single-product.php’ is closed to new replies.