1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 Modifying the Meta Description

Discussion in 'Styling and Customization Questions' started by JoseFebus, Dec 6, 2013.

  1. JoseFebus

    JoseFebus Member

    Hi,

    I what to include the post title in the Meta Description.

    I noticed in the PAGE_CONTAINER ther is this code

    Code:
    <xen:if is="{$head}"><xen:foreach loop="$head" value="$headElement">{xen:raw $headElement}</xen:foreach></xen:if>
        
    But I have no Idea where to assign the new value to the description. What I want is to include the Title and the first X characters from the posts. Also I want to remove any line breaks.

    Thanks for your help
     
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    What exactly are you attempting to add to the meta tags? Its set within thread_view.
     
  3. JoseFebus

    JoseFebus Member

    Thanks Jeremy!

    I was able to include the title in the meta description

    Code:
    <xen:container var="$head.description">
        <meta name="description" content="{$thread.title} - {xen:helper snippet, $firstPost.message, 155}" /></xen:container>
    
    Thanks!
     
    Adam Howard likes this.

Share This Page