MyBB Community Forums
Meta tags have no effect outside of headerinclude - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: Meta tags have no effect outside of headerinclude (/thread-231394.html)



Meta tags have no effect outside of headerinclude - Walter_Correa - 2021-02-24

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!


RE: Meta tags have no effect outside of headerinclude - Matt - 2021-02-24

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.


RE: Meta tags have no effect outside of headerinclude - Walter_Correa - 2021-02-24

(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!