Home Forums Pro Themes Education Hub Pro Comments shortcode in sidebar isn’t working

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #128342
    Lisa Ramish
    Participant

    I am trying to get the comments section on the page to appear in the sidebar. I pasted this in my function.php:

    function my_wpdiscuz_shortcode() {
    if (file_exists(ABSPATH . ‘wp-content/plugins/wpdiscuz/templates/comment/comment-form.php’)) {
    ob_start();
    include_once ABSPATH . ‘wp-content/plugins/wpdiscuz/templates/comment/comment-form.php’;
    return ob_get_clean();
    }
    }

    add_shortcode(‘wpdiscuz_comments’, ‘my_wpdiscuz_shortcode’);

    Then I can pasted [wpdiscz_comments] in a text widget in my sidebar. I am just getting a blank screen where the comments should be.

    #128381
    wensolutions
    Keymaster

    Hello,

    Regarding your query, the shortcode you have used might not be compatible with the theme which is why the sidebar is not supporting the shortcode.

    Also, we do not have any shortcode that is used for the comment section.

    If you have further queries/confusion, kindly let us know.

    Regards.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.