• Resolved Arbab Ali

    (@dont890)


    I am trying to auto-add some shortcode at the end of every woo product description. (not after short description). The code with which I am trying is:

    add_filter('the_content','ce_add_text_long_descr');
    function ce_add_text_long_descr($description){
    $text="[my-shortcode-goes-here]";
    return $description.$text;
    }

    That one is not working for me. can someone help me?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Mirko P.

    (@rainfallnixfig)

    Hi @dont890,

    Thanks for contacting us.

    Your snippet seems to work correctly on a basic installation of WordPress, WooCommerce, and the Storefront theme.

    It sounds like it’s conflicting with another plugin or with your theme. You can run a conflict test to figure out which tool is causing trouble.

    https://docs.woocommerce.com/document/how-to-test-for-conflicts/

    If you’re adding the snippet to your functions.php file I would suggest using Code Snippets instead and checking if it works there.

    Cheers.

    Mirko P.

    (@rainfallnixfig)

    Hi there,

    We haven’t heard from you in a while, so I’m going to mark this as resolved. Feel free to start a new thread if you have any more questions.

    Cheers.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add HTML to WooCommerce product description’ is closed to new replies.