Thread tagged as: Question, Error, Meta

Perch and HTML elements


I am having a problem adding Perch to two HTML elements in my code. The first is the <title> tag, this is my current code:

<title><?php perch_layout_var('title'); ?></title>

When you view the page, the title tag shows up completely blank because Perch isn't inserting the title in there. Is this the wrong tag? Or do I need to do something else to make it work?

The second problem, which is related is working with the <meta> description tag. This is what I currently have:

<meta name="description" content="<?php perch_layout_var('description'); ?>"/>

This isn't working either. Can I get clarification on how to make this work?

Note that this info should be pulling from what the user enters under "Page Details." Sorry, I couldn't find anything detailed on either of these tags in the documentation, besides this.


Outside the Lens

Outside the Lens 0 points

  • 7 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

perch_layout_vars are the values that you pass into a Perch Layout (as detailed on the page you linked to).

Are you using a Perch Layout? If so can I see your code?

The information entered under page details has nothing to do with layout_vars, the documentation for Page Attributes is here:

and a video:

Rachel Andrew said:

Thanks, I never was able to find that page in the documentation! Your support always rocks!