What's the “shortco...
 
Share:
Notifications
Clear all

Question [Solved] What's the “shortcode” for wpDiscuz to be used with Elementor free version ?

2 Posts
2 Users
0 Likes
390 Views
Posts: 6
Topic starter
(@vikramvi)
Active Member
Joined: 10 months ago

Hi,

I'm using Elementor "free" version and "shortcode" widget to show comments on blog post.

Please let me know what value should I use for "shortcode" ?

Thanks in advance.

 

I'm following below instructions for elementor page builder

 

  1. Once the plugin is installed and activated, go to your Elementor editor and navigate to the page where you want to add the comments section.
  2. Drag and drop the “Shortcode” element from the Elementor widget panel onto the page.
  3. In the shortcode element, enter the shortcode provided by the comments plugin.
1 Reply
Asti
Posts: 6987
 Asti
Support
(@asti)
Illustrious Member
Joined: 6 years ago

Hi @vikramvi,

Please follow the steps below: 

1.Put the following code in the active theme functions.php file:

function my_wpdiscuz_shortcode() {
    $html = "";
    if (file_exists(ABSPATH . "wp-content/plugins/wpdiscuz/themes/default/comment-form.php")) {
        ob_start();
        include ABSPATH . "wp-content/plugins/wpdiscuz/themes/default/comment-form.php";
        $html = ob_get_clean();
    }
    return $html;
}
add_shortcode("wpdiscuz_comments", "my_wpdiscuz_shortcode");

2. Drag and drop the "Shortcode" element from the Elementor widget panel onto the page. Insert this shortcode: 

[wpdiscuz_comments]

3. Enable the comment form for the current post type

That is: the shortcode can be used if the post type supports comments.  

Share: