Sidebar

startup_tutorial_and_checklist:usability_configuration:seo:meta_tags:category_specific_meta_v74

Category Specific Meta Tags

We specifically mention meta tags because that's what most clients want to set. But you can set category specific html (title, meta, script,…etc) in the html head using this feature. We added this feature in v6.

Highlights of this feature:

  • set category specific meta information
  • can set meta for your main categories and let that display in that main categories subcategories
  • can set language specific meta information

Where do you manage the category specific header elements feature in the admin tool?

The information you manage here will be placed in your page templates where the {head_html} tag is. As this is a category based feature the content managed here will only appear within the category browsing and listing details page features. In the default design there are only two page templates in use within those features listed here:

/main_page/category_page.tpl
/main_page/listing_page.tpl

So if you are using this feature and using the default design with few changes in this feature will solely appear in the above page templates. But do note the {head_html} tag is in use within all default page templates.

But note of the above the category_page.tpl is set by default as the page template for the category browsing page. And also by default the listing_page.tpl template is set as the default page template within the listing details page (for both classifieds and auctions). As those are the default (at installation) you can always insert category specific page templates for each feature if you wish. No matter the page template you use within a page that has category specific content (category browsing and listing details pages) if you wish to use the feature explained here to manage the meta tags within them those templates will need the {head_html} tag within them to place the content managed here.

You manage the category specific head html for a specific category by clicking the edit link next to that category withing the following admin tool:

CATEGORIES > CATEGORIES

The following screenshot shows the edit link you would use:

Once you click that you should see a popup like the following where you would choose Category-Specific (Set below) in the Add extra to {head_html} from setting. That will automatically make the {head_html} added contents section appear at the bottow as shown below:

This feature is language specific so you will see a language specific field for each language you have in use on your site.

The header elements you set above will be used only on the category browsing pages and listing details pages of the software. If you wish to setup header html individually for all other pages look to other support wiki pages within this section of the support wiki for more on how. That involves setting page specific header elements using a smarty code loop described in the placing specific meta tags for general pages support wiki page.

For more on this feature see the category specific header html admin tool

Example Uses of the Category Specific HTML Head Element Feature

Meta Tags

You can put category specific meta tags within your pages if you wish. Make sure you insert them as a complete meta tag in the proper form like those examples below.

<meta name="description" content="Some category specific text" />
<meta name="keywords" content="keyword, keyword 1, keyword 2"/>

Note though that the default design already includes some site wide versions of the above meta tags. If you decide to enter category specific ones like those above that you create a page template specifically for the category browsing page in the system. Remove the "site wide meta tags" from that template so you can set the category specific meta tags within this feature.

Title Tag

You can put category specific title tags within your pages if you wish. Make sure you insert them as a complete title tag in the proper form like those example below.

<title>This is a category specific page title</title>

And note also like the meta tag example above that the default design already includes some site wide versions of the title tags. The default design also uses the title tag module to populate that tag. If you decide to enter category specific ones like the one above that you create a page template specifically for the category browsing page in the system. Remove the title tag usage already included as well as mention of the title module from that template so you can set the category specific title tags within this feature.

For this to work you would need to configure your RSS feed to allow the passing of the category id into the feed so that the feed will only display listings of the category id passed to it. See the RSS feature for more on how to do that.

Note that there is already a way to have category specific RSS feed without having to use {header_html} added contents for a category; you can find those instructions in the tutorial How to use Category Specific Feed. That being said, you may still wish to use {header_html} added contents as it would allow you to add an RSS link unique to the category, for instance perhaps you have set up an RSS feed with special configuration settings for a special category, maybe to make it show different fields, or maybe to show more listings than the default 20, or something similar to that.

You could add a category specific RSS feed link into the head element of your category browsing feature. You would first need to get the category id of the category you wish to set this up for. You can find the category id for any category in the system by going to the CATEGORIES > CATEGORY SETUP admin tool and the category id for a category will be the number you see next to that category's name. If the category's name were "autos" and the category id were "123", and you had set up a special RSS feed at auto_rss.php, so that the RSS feed URL you wanted to "link to" for the autos category was this:

http://example.com/auto_rss.php?catId=123

Then the HTML link tag would look something like:

<link href="http://example.com/auto_rss.php?catId=123" rel="alternate" type="application/rss+xml" title="Here are the latest listings in Autos" />

The above would be inserted into the "HTML head element" feature for the Autos (123) category. You would need to replicate for each category you wish to have a "unique" RSS feed.

startup_tutorial_and_checklist/usability_configuration/seo/meta_tags/category_specific_meta_v74.txt · Last modified: 2016/10/17 13:48 by geojames