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.

Possible to embed directly to specific category instead of category list?

R08R08 New
edited December 2014 in Vanilla 2.0 - 2.8

I was hoping to embed different Vanilla categories on their corresponding web pages. Ideally I would be able to embed straight to a defined category.
Has anyone successfully embed to a specific category instead of Vanilla's category list page?

Also curious about the blog comments feature. When using Vanilla as blog comments what defines which category or which post the comments will be linked to. I place the embed blog comment code in a page but not sure what controls what it links to (where the comment will show up).

Using Vanilla 2.1.6

Best Answers


  • If you are only going to serve your forum embedded, you can change the DefaultController in the Routes Section of your dahboard which is the homepage of your forum. just change it to the route of the category, e.g. /categories/general.

    For embedded comments read:

  • Still trying to grasp how Routes would work for this situation. Yes I can change the DefaultController to a specific category. But that will only work for one page/category. What I was trying to get to is something like:

    • Webpage about cars > display Vanilla category Cars
    • Webpage about houses > display Vanilla category Houses

    So as you skip webpages the corresponding forum category loads for that page.

  • Should have mentioned I'm not using WP. using the universal code for my site... reading the WP plugin description is says

    ...and select the forum category where you would like comment discussions to appear

    So it's possible with the plugin, but not using plugin.
    I thought maybe by editing the universal embed code could get this effect.

  • R08R08 New
    edited December 2014

    Embed Blog Comment feature:

    There is an option to specify vanilla_discussion_id and vanilla_category_id. I just haven't figured out how to make it click. Tried putting in for CategoryID = 3 but still nothing.

    <div id="vanilla-comments"></div>
    <script type="text/javascript">
    /*** Required Settings: Edit BEFORE pasting into your web page ***/
    var vanilla_forum_url = ''; // The full http url & path to your vanilla forum
    var vanilla_identifier = 'your-content-identifier'; // Your unique identifier for the content being commented on
    /*** Optional Settings: Ignore if you like ***/
    var vanilla_discussion_id = 'fix-it'; // Attach this page of comments to a specific Vanilla DiscussionID.
    var vanilla_category_id = '3'; // Create this discussion in a specific Vanilla CategoryID.


    == Sorry for above code... but code doesn't want to format even though I put it in a CODE style/paragraph

  • My mistake was not to put both Category ID AND Discussion ID. Having just one doesn't work, makes sense now.

Sign In or Register to comment.