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.

Run Wordpress short code before embedding forum on wordpress page

edited May 2014 in Vanilla 2.0 - 2.8

Hi Guys!

I run an airsoft community on a wordpress page. Vanilla forums embedded perfectly on a full width page, so theres no wordpress sidebar to confuse our visitors.

One thing I miss right now tho, is the upcoming 3 events widget that was in the sidebar. I'd like to put the 3 upcoming events on top of the page, but whenever I place the correct short code above the forum embed code, it just disappears.

It seems the forum pushes itself as the top element and it negates all the wordpress short codes I put in there. Even when I just add a paragraph of text, the text goes missing and theres just the embedded forum.

Am I missing something? I guess its not possible to get a wordpress widget to display within the vanilla sidebar?

This is a result I had in mind, to illustrate. The 3 upcoming events are displayed left to right at the top of the page and after that, the forum embed renders.

Best Answer


  • Options

    I don't believe you can put wordpress widgets in the side panel unless you re-write them in the form that vanilla uses.

    you could write a plugin or modify a vanilla plugin...

    e.g. forum donate and manually add the events and links statically.

    or you could add code that reads the sql from wordpress database and adds it dynamically.

    or you could change the format of your wordpress so the events widgets are in the wordpress page at the top. (not the embedded code).

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    Thanks for your answer Peregrine. I've thought about doing a custom SQL.

    I tried adding the code in the top of the page before the embed code from Vanilla, but it seems like Vanilla just squishes the code out of the way... :(

    Like I said, even when I add a paragraph of text in front of the embed code, the paragraph just disappears.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited May 2014

    You can't add code to an iframe.... You need to add those to the vanilla forum not the iframe of the forum in your embed.

    The embed is not the forum it is a clone. It appears inside an iframe container and you can't edit or add stuff inside it. It needs to be in your theme template or a plugin for vanilla.

    You can add code to a page where the iframe is embedded, but you need to do it using a div to make room.

    Put your embed inside div and see if that works

  • Options
    edited May 2014

    Sadly its not working as well. I'll just have to see if I can add a sidebar somewhere in the theme and make it horizontal. That will have the same effect.

    I know its an iframe, but the strangest thing to me is, iframes from youtube work like I need. You can add text before the iframe code and it will display before the youtube video on the page.

    But the iframe from Vanilla is like the mean kid on the block. Pushing everything away to be the only one in the spotlight!

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited May 2014

    You can use the message module to add some code in the template. Also there are several plugins you can try, one is VSlider this one goes above the content, check it out. Also Widgets you can see how to add modules and content , There is Marquee, Pockets
    many plugins that can work

  • Options

    Thanks for all the replies and helpful tips!

  • Options

    Fixed it by adding a widget area before the forum. My theme runs on a framework so it turned out to be really easy.

Sign In or Register to comment.