5

It doesn't seem I can get my meta tags to appear on the page--front.tpl.php on a Drupal 7 site.

I feel like I have all the correct settings in the Meta tags module configuration, and I have cleared all caches. It works perfectly fine for all pages, just not the front page. This is driving me bonkers.

Any ideas?

4 Answers 4

13

Below are the steps without touching the files and using the drupal admin interface.

  1. Go to admin/config/search/metatags/config/global:frontpage/edit
  2. Add the Page title, Description etc and Save
  3. Refresh the front page and check. Done !!
2
  • 4
    Thanks. This is the correct answer. The rest is just a waste of time.
    – the
    Jun 4, 2015 at 15:40
  • 1
    Yes, indeed, how did you know that? May 1, 2017 at 8:34
4

Try printing

<?php print render($page['content']['metatags']); ?>

in your page.tpl.php or page--front.tpl.php if youre using Meta tags

1
  • 1
    Wouldn't that print metatags in body instead of head, or this doesn't matter?
    – Wtower
    Oct 3, 2013 at 12:02
1

What module are you using for Metatags?

I believe the most popular one is metatags_quick. If you are using this I think you need to set the homepage metatags with the "Path-Based Metatags". You should be able to find this at site.com/admin/config/search/metatags_quick/path_based

2
  • 1
    I wanted to do this, I have metatags quick, but how do you specify the homepage? Im not sure how you specify the "frontpage" as a path? Its perfect for 'views', but I cant figure out how to use for frontpage. Jul 20, 2012 at 23:41
  • 2
    I finally figured this out. Assuming you have Meta tags quick, you can go to the 'path based meta tags" tab and add the following as a path: node You then assign the appropriate metatag data. -Mac Jul 20, 2012 at 23:54
1

Found a quick and easy solution that shows meta tag description on page view source HTML for anonymous visitor, also Bing SEO Analyzer detects.

  1. Go to Meta Tag (Quick) settings from Configuration admin menu.
  2. Under the section Create and Attach, check box for Description for Taxonomy Term
  3. Click Attach
  4. Click Submit
  5. Go to admin Structure menu, Taxonomy, Section, List terms
  6. Edit Home to add a description in the (Meta) Description field.

Works

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.