I had to get some band reviews that were already in Disqus from from my old site into my new WordPress band site. I only wanted the reviews on our home page so here’s what I did…
I looked at the code on my old site and grabbed the disqus_identifier value from there.
I went to add a custom field to the home page. To my surprise in the list there was already a custom field there named dsq_thread_id. So I added that custom field and gave it the disqus_identifier value from my old site.
I’m new to WordPress and PHP so this is probably bad a bad idea, but I needed to get this done, so I edited the Disqus plugin’s comment.php by adding this code after all the var initialization…
<?php if ( get_post_meta($post->ID, 'dsq_thread_id', true) ) : ?>
disqus_identifier = '<?php echo get_post_meta($post->ID, 'dsq_thread_id', true); ?>';
<?php endif; ?>
BAAAMMM! Worked the first time…
If you have any ideas about how to get this to work without changing the Disqus plugin code base, that would rock. I need to take a step back and really think this over after the new site is released in a couple of day.
-Chris
https://www.u2act.com