Forum

Thread tagged as: Question, Blog

Dynamic title on blog archive pages

Hello,

I'm attempting to have the name of the archive between the title tags, for example "Archive of: Category Name". However I'm not sure how to get this to work, i've had a look through the documentation and haven't found anything I can use.

I've tried,

Posts in <?php perch_get('cat') ?>
Posts in <?php perch_blog_category(perch_get('cat') ?>

Any ideas?

Thank you

Chima Nwosu

Chima Nwosu 0 points

  • 5 years ago
Simon Clay

Simon Clay 127 points

Hi, I think you should be able to do it with

<?php perch_blog_category(perch_get('cat'), true) ?>

Hey Simon,

Thanks for the reply - that doesn't seem to work either.

Simon Clay

Simon Clay 127 points

That works for me. What is your url when testing? Mine is: https://my-site:8888/blog/archive.php?cat=kitchens

And the title displays 'Kitchens'

Hey Simon,

here's my link: https://beecrowned.com/archive.php?cat=motivation and here's mys line of code

<title>Posts in <?php perch_blog_category(perch_get('cat'), true) ?></title>
Simon Clay

Simon Clay 127 points

Hi, try...

<title><?php perch_blog_category(perch_get('cat')); ?></title>

So it turns out i've been uploading the wrong file for 8 hours of the day. Thank you for your help Simon!