Revisions
- April 28, 2013 @ 12:04:17 [Current Revision] by PeterLugg
- April 28, 2013 @ 12:03:43 by PeterLugg
Revision Differences
April 28, 2013 @ 12:03:43 | Current Revision | ||
---|---|---|---|
Content | |||
Deleted: Taken from this WordpRess support thread. | Added: Taken from this <a href="http:// wordpress.org/ support/topic/ disqus-shortcode" target="_blank" >Wordpress support thread</a>. | ||
Unchanged: Put his in your functions.php file: | Unchanged: Put his in your functions.php file: | ||
Added: [php] | |||
Added: <pre>< code>function disqus_embed( $disqus_shortname) { | |||
Added: global $post; | |||
Added: wp_enqueue_script( 'disqus_embed','http: //'.$disqus_ shortname.'.disqus.com/embed.js'); | |||
Added: echo '<div id="disqus_ thread"> </div> | |||
Added: <script type="text/ javascript"> | |||
Added: var disqus_shortname = "'.$disqus_ shortname.'"; | |||
Added: var disqus_title = "'.$post- >post_title.'"; | |||
Added: var disqus_url = "'.get_permalink( $post->ID).'"; | |||
Added: var disqus_identifier = "'.$disqus_ shortname.'-'.$post- >ID.'"; | |||
Added: </script>'; | |||
Added: }</code> </pre> | |||
Deleted: | Added: [/php] | ||
Unchanged: Use this in any place where you want the Disqus comments to appear: | Unchanged: Use this in any place where you want the Disqus comments to appear: | ||
Deleted: [php][/php] | Added: [php]disqus_embed('THE SHORTNAME OF YOUR DISQUS');[/php] |
Note: Spaces may be added to comparison text to allow better line wrapping.
No comments yet.