Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author HelgaTheViking

    (@helgatheviking)

    You can display the subtitle anywhere you want. Please review the faq and also see this thread for more WooCommerce specific info.
    https://www.ads-software.com/support/topic/not-showing-on-woocommerce-product-site?replies=16

    Thread Starter Mia

    (@wellejus)

    Thank you. I tried to add
    add_action( ‘woocommerce_shop_loop_item_title’, ‘kia_add_subtitle_to_woocommerce’ );

    But then the site went blank. (it crashed).

    I added it like this:

    <?php
    function kia_add_subtitle_to_woocommerce(){
    if( function_exists( ‘the_subtitle’ ) ) the_subtitle( ‘<h2 class=”subtitle”>’, ‘</h2>’ );
    }

    add_action( ‘woocommerce_single_product_summary’, ‘kia_add_subtitle_to_woocommerce’, 7 );

    add_action( ‘woocommerce_shop_loop_item_title’, ‘kia_add_subtitle_to_woocommerce’ );
    ?>

    Thread Starter Mia

    (@wellejus)

    Now it works. But after I added the code the site goes blank after each update….?

    Plugin Author HelgaTheViking

    (@helgatheviking)

    If you get “white screen of death” then you almost assuredly have a syntax error somewhere. You can enable WP_DEBUG to discover where.

    Thread Starter Mia

    (@wellejus)

    I couldn’t find out how to use the WP_Debug – nothing appeared on the white screen. But I just think I won’t use this plugin that I figured out it is this plugin that causes the white screen. ?? But thank you for your help.
    If it didn’t caused the white screen it is a nice plugin.

    Plugin Author HelgaTheViking

    (@helgatheviking)

    The plugin works, and I’ve re-tested the code snippet above (added to your functions.php)… which also works. So the problem is not with the plugin but in your implementation somewhere. Are you opening and closing php tags needed and in the correct place?

    Again, I urge you to enable WP_DEBUG by adding

    define( 'WP_DEBUG', true );

    to your wp-config.php file. The white screen should reveal an error if debug mode is enabled.

    Thread Starter Mia

    (@wellejus)

    At first I added it into the same <?php ?> tag, but then it crashed so I added it in a new tag.

    But it still crash..
    I tried to use the WP_DEBUG but probably not at the right way because nothing show up, only white screen… ?

    Plugin Author HelgaTheViking

    (@helgatheviking)

    go to wp-config.php and find
    define('WP_DEBUG', false);

    change that to true. I really can’t do too much until you figure out how to enable debugging. Here are some good references to read:

    https://premium.wpmudev.org/blog/debugging-wordpress-how-to-use-wp_debug/
    https://codex.www.ads-software.com/Debugging_in_WordPress

    Disable all other plugins. Please post your wp-config.php in a pastebin.com paste (but don’t forget to edit out your mysql user name and password). Consider asking your host why error messages aren’t displaying.

    What theme are you using? If it is available on www.ads-software.com, simply post your functions.php in a pastebin. If it isn’t find a way to temporarily host the .zip file so I can download it.

    Thread Starter Mia

    (@wellejus)

    So I added the code once again and activated the plugin. At the moment I have no problems… :/

    Thanks for your help. I hope it will work from now on. Otherwise I will try the debug again – or contact you again ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Show on "all products"’ is closed to new replies.