MyBB Community Forums

Full Version: Forum description doesn't show
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
<meta property="og:description" content="{$foruminfo['description']}" />

I added this in <head> tags in forumdisplay template. But when I check any forum on faceboog share debugger tool, it doesn't show forum description.
Is there any other variable for this or what?

PS: I also checkedĀ <meta property="og:description" content="{$forum['description']}" /> and that doesn't work either.
Oh, sorry, I'm making it complicated..

<meta property="og:description" content="{$foruminfo['description']}" /> should be added in the forumdisplay template.

It shows well for me.

Have you checked if the forum have description and if the page is loaded correctly?



Please don't use the plugin below, it may leak private forum's info.

Previous reply:

Sorry you just can't do it that way because when MyBB renders the headerinclude the variable neither $foruminfo nor $forum exists. That's definitely a drawback of current MyBB 1.8's template system.

An effective method just hits my mind which is you can write a little plugin to achieve it.

Here's a simple example: https://gist.github.com/yuliu/ 40f359716e490b9dc09d5feca494d788 . To use it, you could just save the file as share_misc.php and upload it to ./inc/plugins/ folder on your server.
Nevermind, I fixed it. The problem was that I have that OG tag for description in headerinclude template, so it was always replacing forumdisplay tags.