Hi, I would like to be able to display category names in my HTML title tags.
My site is: http://www.getdialing.com
I have a template index page which is used for my main categories: Landline, Mobile, Voip, Mobile Voip, Phone Cards, Free Calls. This is one category group.
This is the code I’m using:
<title>
Make Cheap Phone Calls: {exp:weblog:entries weblog="{my_weblog}" category_group="1" limit="1"}
{categories}{category_name}, {/categories}{/exp:weblog:entries}
</title>What I would like to do is to display a title tag containing the category name “Landline” when this page is requested, something like this: “Make Cheap Landline Phone Calls” and the same for other categories eg. “Make Cheap Mobile Phone Calls”.
Is this possible, and if so, how can I do it?
At the moment I have the same HTML title tag for several pages, which I’d like to avoid. However, even though all these pages are generated from the same template, the title tags on two of the categories show differently, which I don’t understand. This happens whether I use category_group=“1” or not. In some cases, category names from other category groups are showing too.
As I’m sure you can tell from my question, I’m not a programmer so I would really appreciate if you could keep any explanation simple 😊
thanks