Individual Category Meta Titles

  • OK, I've searched and searched and can't find a resolution.


    I'm trying to make it so that Category (Archive) pages have meta titles of that Category for each individual Category.


    For example:

    Cat A has meta title Cat A

    Cat B has meta title Cat B

    etc


    Out of the box the Categories have the Meta title <title>Perch Blog Example Archive Page</title> which means all Categories have the same Meta titles.


    Any ideas how I can achieve this please?

  • drewm

    Approved the thread.
  • It really depends on how you are generating the meta tags. Can you share the templates?


    Basically you need to:

    • Check if archive page is filtering by a category
    • If so then get the category data
    • Assign the cat meta data ( title or another custom field) to a variable
    • Pass that variable to your meta layout.
    • In the meta layout if that variable exists then swap out the page title for the variable
    • Pour yourself a cup of tea