Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

'Vanilla as Wordpress comments' functionality—not using Wordpress

edited June 2012 in Vanilla 2.0 - 2.8

Vanilla has that awesome integration that allows it to replace the standard Wordpress comments with a Vanilla topic. I'm running a site that doesn't run Wordpress.

I'd like to embed a Vanilla conversation below my content manually (instead of, for example, inserting a Facebook comments widget.)


  • I was pretty tired when I wrote this. I supposed a better title would be:

    Embed Vanilla Comments Outside of Wordpress?

    That's what I'm trying to do and would love to do... :)

  • I guess the functionality isn't presently available. It looks like my best course of action is to adapt the Wordpress Vanilla Forums plugin to suit my needs. I will keep this thread updated if I'm able to make good progress.

    I found this nice little javascript code and it'll be my starting point :)

    <script type="text/javascript">
    var vanilla_forum_url = '<?php echo vf_get_value('url', $options); ?>'; // Required: the full http url & path to your vanilla forum
    var vanilla_identifier = '<?php echo $post->ID; ?>'; // Required: your unique identifier for the content being commented on
    var vanilla_url = '<?php echo get_permalink(); ?>'; // Current page's url
    <?php if ($categoryid) { ?>
    var vanilla_category_id = '<?php echo $categoryid; ?>'; // Embed comments in this category
    <?php } ?>
    if ($sso = vf_get_sso_string()) {
       echo "var vanilla_sso = '$sso';"; // Single-Sign-On string.
    (function() {
        var vanilla = document.createElement('script');
        vanilla.type = 'text/javascript';
        var timestamp = new Date().getTime();
        vanilla.src = vanilla_forum_url + '/js/embed.js';
        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(vanilla);
Sign In or Register to comment.