We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

LG Better Meta: Having problems getting the title tag to work properly on the home page

Development and Programming

JulesWebb's avatar
JulesWebb
271 posts
16 years ago
JulesWebb's avatar JulesWebb

I have the all my Meta working on all my pages except home. I’m assuming that it would be the same as my other basic pages (about, services, contact) but for some reason I can’t get it to show the content from the “Entry meta” fields.

{exp:weblog:entries weblog="home" limit="1" disable="member_data|comments|trackbacks|pagination"}
{embed="includes/DOC-head" url_title="{segment_1}" title_prefix="Pre" title_suffix="title suffix" hide_site_title = "y" }
{/exp:weblog:entries}

I am using friendly urls so my home page is: http://example.com/ Does anyone have any suggestions? Thanks ~Jules

       
JulesWebb's avatar
JulesWebb
271 posts
15 years ago
JulesWebb's avatar JulesWebb

I believe the problem might actually have to do with

url_title="{segment_1}"

Since I’m using friendly url’s what segment is the home page if it looks like this: http://mysite.com

URL Segment Variables Documentation: http://expressionengine.com/docs/templates/globals/url_segments.html

Appreciate any insights! Jules

       
JulesWebb's avatar
JulesWebb
271 posts
15 years ago
JulesWebb's avatar JulesWebb

I finally figured it out. Because of my friendly urls I needed to use entry_id instead of url_title

So for my hm page template I used:

{exp:weblog:entries weblog="home" limit="1" disable="member_data|comments|trackbacks|pagination"}
{embed="includes/DOC-head" entry_id="16" title_prefix="" title_suffix="" hide_site_title = "y" }
       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.