MyBB Community Forums

Full Version: Meta tags have no effect outside of headerinclude
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
First of all, I used Google SEO Plugin and it still didn't work!

I'm trying to insert meta tags for google and facebook, so I need to insert the tags in forumdisplay template:
<html>
<head>
{$headerinclude}
<title>{$mybb->settings['bbname']} | {$foruminfo['name']}</title>
<meta property="og:title" content="{$mybb->settings['bbname']} | {$foruminfo['name']}">
<meta property="og:description" content="{$foruminfo['description']}">
</head>

But facebook is not recognizing these tags, only when I put them inside headerinclude template, but only to work properly showing the name of the forum and its description needs to be inside forumdisplay template, because {$headerinclude} is used on other pages and they will all go with the same tags.

I can't understand why it doesn't work outside of headerinclude template, it doesn't make any sense, please help me!
When you add them to the forumdisplay template and view the page source, do they show up? It sounds like you're not editing the right template set or it's loading the forumdisplay template from somewhere else to where you're editing.
(2021-02-24, 05:19 PM)Matt Wrote: [ -> ]When you add them to the forumdisplay template and view the page source, do they show up? It sounds like you're not editing the right template set or it's loading the forumdisplay template from somewhere else to where you're editing.

- Yes, the tags usually appear with the title and description when I see the page's source code, but facebook doesn't recognize them.
- I'm editing MY THEME > Forum Display Templates > forumdisplay.

I sincerely apologize, I found that facebook doesn't recognize the tags if the forum is closed! Thank you very much for your attention and sorry for the inconvenience!