Title: Have the same thread on different posts
Last modified: August 22, 2016

---

# Have the same thread on different posts

 *  [9ery](https://wordpress.org/support/users/9ery/)
 * (@9ery)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/have-the-same-thread-on-different-posts/)
 * Hello,
    I’ve tried all the solutions available on the internet, but I couldn’t
   manage to make the custom fields working to have different posts loading the 
   same thread…
 * Here are the options I tried :
 *     ```
       <?php
       //Attempt to get identifier
       $disqus = get_post_meta($post->ID, 'dis_ident_field', true);
       //if isset & not blank else use $post->ID
       $disqus = (!empty($disqus)) ? $disqus : $post->ID;
       ?>
   
       var disqus_identifier = '<?=$disqus?>';
       ```
   
 * from : [http://stackoverflow.com/questions/9310831/be-able-to-change-disqus-identifier-on-some-pages](http://stackoverflow.com/questions/9310831/be-able-to-change-disqus-identifier-on-some-pages)
 * I’m a little bit lost in here…
 * [https://wordpress.org/plugins/disqus-comment-system/](https://wordpress.org/plugins/disqus-comment-system/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Contributor [ryanv12](https://wordpress.org/support/users/ryanv12/)
 * (@ryanv12)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/have-the-same-thread-on-different-posts/#post-5488739)
 * If you’re trying to customize the way threads load on certain pages, you might
   consider disabling comments for that page (which also disables Disqus), and implementing
   our universal code:
 * [https://help.disqus.com/customer/portal/articles/472097](https://help.disqus.com/customer/portal/articles/472097)
 * That should give you complete control over the variables passed to the embed.
 *  Thread Starter [9ery](https://wordpress.org/support/users/9ery/)
 * (@9ery)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/have-the-same-thread-on-different-posts/#post-5488792)
 * Hello,
 * first, thank you for your help. I did what you said first, disabling comments
   and adding the following code in the .php for my posts :
 *     ```
       <div id="disqus_thread"></div>
       <script type="text/javascript">
           /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
           var disqus_shortname = 'myshortname'; // Required - Replace example with your forum shortname
           var disqus_identifier = '<?php echo get_post_meta($post->ID, 'dis_ident_field', true); ?>';
   
           /* * * DON'T EDIT BELOW THIS LINE * * */
           (function() {
               var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
               dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
               (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
           })();
       </script>
       ```
   
 * So I am able to set **dis_ident_field** in the custom fields of wordpress.
 * But for some reason, it doesn’t show the thread I want. So I am doing a mistake
   somewhere, but I’m not sure where:
    – Am I using the right ID for the thread 
   while defining dis_ident_field ? – Is it the one we find in the admin/moderate
   section in disqus when I select the thread like : thread:xxxxxxxxx? – Am I stupid?
   🙂
 *  [Doremdou](https://wordpress.org/support/users/doremdou/)
 * (@doremdou)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/have-the-same-thread-on-different-posts/#post-5488999)
 * Hi 🙂
    Did you find a solution to this problem? I don’t know how to do it either…;(
 * And ryanv12 when you say “implementing our universal code” do you mean that we
   won’t be able to login via our wordpress website anymore because this code doesnt
   use the plugin?
 * thank you very much

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Have the same thread on different posts’ is closed to new replies.

 * ![](https://ps.w.org/disqus-comment-system/assets/icon.svg?rev=1636350)
 * [Disqus Comment System](https://wordpress.org/plugins/disqus-comment-system/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/disqus-comment-system/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/disqus-comment-system/)
 * [Active Topics](https://wordpress.org/support/plugin/disqus-comment-system/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/disqus-comment-system/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/disqus-comment-system/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Doremdou](https://wordpress.org/support/users/doremdou/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/have-the-same-thread-on-different-posts/#post-5488999)
 * Status: not resolved