The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Embed comment secti...
 
Share:
Notifications
Clear all

Embed comment section in a sidebar?

5 Posts
2 Users
0 Reactions
2,764 Views
Posts: 5
Topic starter
(@lisa-ramish)
Active Member
Joined: 4 years ago

I am using Content Aware Sidebars with my Education Hub theme to have specific sidebars for specific posts. I would like to put the wpDiscuz comment section in the sidebar of each post. I've seen a little discussion around about embed codes but I can't seem to find what I need. Is there an embed code for each form? Where do I find it? If not embed codes, is there something I can use?

4 Replies
Asti
Posts: 7617
 Asti
Support
(@asti)
Illustrious Member
Joined: 7 years ago

Hi @lisa-ramish,

there are two possible ways:

1. You can use the comments_template() function. wpDiscuz can be loaded via the function. 

2. You can use the wpDiscuz shortcode. The shortcode is provided here by Taron. 

Reply
3 Replies
(@lisa-ramish)
Joined: 4 years ago

Active Member
Posts: 5

@asti Thank you! I have seen both of those ways floating around. I know that I don't have a lot of experience with these things. I certainly don't know how to use templates or functions so it seems like option #2 is my best chance. Unfortunately I don't know where to put the wpDiscuz shortcode for option #2. Is this something I put into a custom CSS widget for the sidebar? Do I put it at the bottom of a post?

Reply
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7617

@lisa-ramish,

you should find and install some plugin that allows you to embed shortcodes in the widget content. 

Here is an article that should be helpful for you: https://www.wpbeginner.com/wp-tutorials/how-to-use-shortcodes-in-your-wordpress-sidebar-widgets/#:~:text=First%20thing%20you%20need%20to,to%20store%20your%20widget%20settings.

Or change the widget codes and make embedding shortcodes in the widget content available. 

Reply
(@lisa-ramish)
Joined: 4 years ago

Active Member
Posts: 5

@asti That didn't work. Besides other shortcodes are working in my sidebar so I don't think that's the problem. This is what a friend of mine who I talked to on facebook said:

 
Hmm, it seems like wpdiscuz's shortcode is busted and not loading in the intended location. I would remove that "sidebar" widget as that is probably what is causing the comment form to load twice.

Anyway this is something that would really require a template modification or DOM manipulation with JavaScript, not something that can be effectively solved with CSS alone.

After removing the extra comment form and emptying out the sidebar I was able to move the comments to the sidebar with a few lines of JavaScript.

Although ideally this would be done by template modification as there's no need to manipulate the DOM like this if you have access to the template to modify on the server-side.

 
Image may contain: text
 
Reply
Share: