If Metatags not working on frontpage.tpl – Drupal Solve
If Metatags not working on frontpage.tpl – Drupal Solve https://jesandy.com/wp-content/uploads/2013/07/modules-meta-tags-not-working.jpg 500 334 Jesandy Krisano https://jesandy.com/wp-content/uploads/2013/07/modules-meta-tags-not-working.jpg
I ran into an issue where the Meta Tags module was working fine on inner pages but refused to show up on the front page. If you’re facing the same problem—especially when using a custom page–front.tpl.php or another overridden page template—here’s what I found.
The Problem
Meta tags appear correctly on other pages, but the front page is missing them.
In many cases, this happens because the Meta Tags module was installed last or the overridden template doesn’t render the meta tag content properly. I have two alternative solutions for this problem:
Solution 1: Reinstall the Module
The cleanest fix is to reinstall Meta Tags:
- Disable the module
- Uninstall the module
- Delete it from your server (from cpanel)
- Re-install the module
- Activate it again
That usually clears up the rendering issue.
Solution 2: Manual Fix (if uninstall doesn’t work)
If you don’t want to uninstall, or if the uninstall process fails, you can patch it directly in your theme files:
- go to control panel > file manager
- navigate or go to folder public_html/sites/all/themes/yourtheme/tpl
- open your page–front.tpl.php (or whichever overridden template you’re using)
- Inside the <head> section, add this code:
< ?php render($page['content']['metatags']); ?>
- Save the file and refresh your site.
That forces Drupal to output the meta tags correctly on your front page.
Final Note
This fix worked for me, and hopefully it saves you the same headache.
Leave a Reply