Support » Plugin: Widget Shortcode » Not working when added through functions.php

  • Hi,

    So I need to display a widget through a shortcode on Wooocommerce’s single product page by adding it through functions.php. Here’s what I’ve tried but it’s not working, it’s now showcasing widget’s content on a page:

    add_filter( 'woocommerce_short_description', 'custom_woocommerce_short_description' );
    function custom_woocommerce_short_description( $description ) {
    global $post;
    $description = $description . do_shortcode('[widget id="mks_author_widget-3"]') ;
    return $description;

    What could be the issue?

  • The topic ‘Not working when added through functions.php’ is closed to new replies.