3

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?

11

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
    Thanks. This is the correct answer. The rest is just a waste of time. – guaka Jun 4 '15 at 15:40
  • Yes, indeed, how did you know that? – Bruno Vincent May 1 '17 at 8:34
2

Try printing

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

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

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

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

  • 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. – MacLean Fitzgerald Jul 20 '12 at 23:41
  • 1
    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 – MacLean Fitzgerald Jul 20 '12 at 23:54
0

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, privacy policy and cookie policy

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