May 04, 2023 11:53 am
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
- 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.
- Drag and drop the “Shortcode” element from the Elementor widget panel onto the page.
- In the shortcode element, enter the shortcode provided by the comments plugin.
Website URL
1 Reply
May 04, 2023 12:11 pm
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.