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

XF 1.4 Add Meta tags from within template

Discussion in 'Styling and Customization Questions' started by Warchamp7, Oct 15, 2016.

  1. Warchamp7

    Warchamp7 Active Member

    Is it possible to add <meta> tags to particular pages (Ex. node_level_2)? I want to specify some OpenGraph stuff so that the images Facebook/Reddit/etc. pull are better than simply the forum logo
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    Yes. We do this on a few pages.

    To see an example search templates for $head.meta.
     
    Warchamp7 likes this.
  3. Warchamp7

    Warchamp7 Active Member

    Is it at all possible to remove the og:image meta tag from a particular page?

    Reddit appears to grab the first og:image it comes across and from within the template I'm in, adding an og:image makes it a 3rd entry, with user avatar as the 1st and site logo.og.png the 2nd

    Edit: The open_graph_meta template was actually being included within the template I was working in already, so I just changed the order of things as well as some logic. All good now!
     
    Last edited: Dec 11, 2016

Share This Page