Forum

Thread tagged as: Question

seo.html and the page title tag

When editing a page's 'Page Details' is the item identified as 'Page title' actually the page's html <title> tag? Or do I need to specify that in seo.html if I want users to be able to edit the true page <title> tag as well as meta description tag?

Charlie Elsey

Charlie Elsey 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Normally that would be used in the <title> tag, but it depends on how you've set your site up.

Drew McLellan said:

Normally that would be used in the <title> tag, but it depends on how you've set your site up.

What I thought, which is why I asked, as currently if user edits the 'Page title' the info is not feeding through to the <title> tag in output html (but the description content is)

So how would I set the site up differently to enable title tag editability?

Drew McLellan

Drew McLellan 2638 points
Perch Support

What do you currently have in your page to output the title?

Drew McLellan said:

What do you currently have in your page to output the title?

currently <title> tag is hard coded in the html, so would I just remove that? I only ask because I had meta description hard coded too, and using seo.html the description tag was duplicated in output (so I knew editing 'page details' was sort of working)

You can use perch_pages_title to output the title instead of your hard-coded HTML.

See https://docs.grabaperch.com/functions/navigation/perch-pages-title/

Clive Walker said:

You can use perch_pages_title to output the title instead of your hard-coded HTML.

See https://docs.grabaperch.com/functions/navigation/perch-pages-title/

Thanks Clive so is that going to output as html <title> content the 'Page title' in 'Page Details'?

Yes.

It does not output the <title> tag however.

Test it and see how it works on your staging/dev site.

So I really need to know how editing the 'page title' item in 'Page Details' outputs the actual <title> tag

I meant that it does not output the <title> tag itself, it outputs the text that you have in page title.

So, you would have this in your page:

<title><?php perch_pages_title(); ?></title>

Thanks Clive for your patience, that works great. I really am thick as two short planks some times lol!